public abstract class AbstractDependsOnBeanFactoryPostProcessor extends Object implements BeanFactoryPostProcessor, Ordered
BeanFactoryPostProcessor
that can be used to
dynamically declare that all beans of a specific type should depend on specific other
beans identified by name or type.BeanDefinition.setDependsOn(String[])
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier | Constructor and Description |
---|---|
protected |
AbstractDependsOnBeanFactoryPostProcessor(Class<?> beanClass,
Class<?>... dependencyTypes)
Create an instance with target bean class and dependency types.
|
protected |
AbstractDependsOnBeanFactoryPostProcessor(Class<?> beanClass,
Class<? extends FactoryBean<?>> factoryBeanClass,
Class<?>... dependencyTypes)
Create an instance with target bean, factory bean classes, and dependency types.
|
protected |
AbstractDependsOnBeanFactoryPostProcessor(Class<?> beanClass,
Class<? extends FactoryBean<?>> factoryBeanClass,
String... dependsOn)
Create an instance with target bean, factory bean classes, and dependency names.
|
protected |
AbstractDependsOnBeanFactoryPostProcessor(Class<?> beanClass,
String... dependsOn)
Create an instance with target bean class and dependency names.
|
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
void |
postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) |
protected AbstractDependsOnBeanFactoryPostProcessor(Class<?> beanClass, Class<? extends FactoryBean<?>> factoryBeanClass, String... dependsOn)
beanClass
- target bean classfactoryBeanClass
- target factory bean classdependsOn
- dependency namesprotected AbstractDependsOnBeanFactoryPostProcessor(Class<?> beanClass, Class<? extends FactoryBean<?>> factoryBeanClass, Class<?>... dependencyTypes)
beanClass
- target bean classfactoryBeanClass
- target factory bean classdependencyTypes
- dependency typesprotected AbstractDependsOnBeanFactoryPostProcessor(Class<?> beanClass, String... dependsOn)
beanClass
- target bean classdependsOn
- dependency namespublic void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
postProcessBeanFactory
in interface BeanFactoryPostProcessor