spring-framework / org.springframework.beans.factory.annotation / CustomAutowireConfigurer

CustomAutowireConfigurer

open class CustomAutowireConfigurer : BeanFactoryPostProcessor, BeanClassLoaderAware, Ordered

A org.springframework.beans.factory.config.BeanFactoryPostProcessor implementation that allows for convenient registration of custom autowire qualifier types.

 <bean id="customAutowireConfigurer" class="org.springframework.beans.factory.annotation.CustomAutowireConfigurer"> <property name="customQualifierTypes"> <set> <value>mypackage.MyQualifier</value> </set> </property> </bean>

Author
Mark Fisher

Author
Juergen Hoeller

Since
2.5

See Also
org.springframework.beans.factory.annotation.Qualifier

Constructors

<init>

CustomAutowireConfigurer()

A org.springframework.beans.factory.config.BeanFactoryPostProcessor implementation that allows for convenient registration of custom autowire qualifier types.

 <bean id="customAutowireConfigurer" class="org.springframework.beans.factory.annotation.CustomAutowireConfigurer"> <property name="customQualifierTypes"> <set> <value>mypackage.MyQualifier</value> </set> </property> </bean>

Functions

getOrder

open fun getOrder(): Int

postProcessBeanFactory

open fun postProcessBeanFactory(beanFactory: ConfigurableListableBeanFactory): Unit

setBeanClassLoader

open fun setBeanClassLoader(beanClassLoader: ClassLoader): Unit

setCustomQualifierTypes

open fun setCustomQualifierTypes(customQualifierTypes: MutableSet<*>): Unit

Register custom qualifier annotation types to be considered when autowiring beans. Each element of the provided set may be either a Class instance or a String representation of the fully-qualified class name of the custom annotation.

Note that any annotation that is itself annotated with Spring's org.springframework.beans.factory.annotation.Qualifier does not require explicit registration.

setOrder

open fun setOrder(order: Int): Unit