接口的使用
org.springframework.beans.factory.config.BeanDefinitionCustomizer
使用BeanDefinitionCustomizer的程序包 程序包 说明 org.springframework.beans.factory.support Classes supporting theorg.springframework.beans.factory
package.org.springframework.context.annotation Annotation support for the Application Context, including JSR-250 "common" annotations, component-scanning, and Java-based metadata for creating Spring-managed objects.org.springframework.context.support Classes supporting the org.springframework.context package, such as abstract base classes for ApplicationContext implementations and a MessageSource implementation.org.springframework.beans.factory.support中BeanDefinitionCustomizer的使用
参数类型为BeanDefinitionCustomizer的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 BeanDefinitionBuilder
BeanDefinitionBuilder. applyCustomizers(BeanDefinitionCustomizer... customizers)
Apply the given customizers to the underlying bean definition.org.springframework.context.annotation中BeanDefinitionCustomizer的使用
参数类型为BeanDefinitionCustomizer的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 <T> void
AnnotatedBeanDefinitionReader. registerBean(Class<T> beanClass, String name, Supplier<T> supplier, BeanDefinitionCustomizer... customizers)
Register a bean from the given bean class, deriving its metadata from class-declared annotations.<T> void
AnnotationConfigApplicationContext. registerBean(String beanName, Class<T> beanClass, Supplier<T> supplier, BeanDefinitionCustomizer... customizers)
org.springframework.context.support中BeanDefinitionCustomizer的使用
参数类型为BeanDefinitionCustomizer的org.springframework.context.support中的方法 修饰符和类型 方法 说明 <T> void
GenericApplicationContext. registerBean(Class<T> beanClass, Supplier<T> supplier, BeanDefinitionCustomizer... customizers)
Register a bean from the given bean class, using the given supplier for obtaining a new instance (typically declared as a lambda expression or method reference), optionally customizing its bean definition metadata (again typically declared as a lambda expression).<T> void
GenericApplicationContext. registerBean(Class<T> beanClass, BeanDefinitionCustomizer... customizers)
Register a bean from the given bean class, optionally customizing its bean definition metadata (typically declared as a lambda expression).<T> void
GenericApplicationContext. registerBean(String beanName, Class<T> beanClass, Supplier<T> supplier, BeanDefinitionCustomizer... customizers)
Register a bean from the given bean class, using the given supplier for obtaining a new instance (typically declared as a lambda expression or method reference), optionally customizing its bean definition metadata (again typically declared as a lambda expression).<T> void
GenericApplicationContext. registerBean(String beanName, Class<T> beanClass, BeanDefinitionCustomizer... customizers)
Register a bean from the given bean class, optionally customizing its bean definition metadata (typically declared as a lambda expression).