ImportAwareBeanPostProcessor registered with ROLE_INFRASTRUCTURE
This commit is contained in:
@@ -205,8 +205,10 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
|
|||||||
* Derive further bean definitions from the configuration classes in the registry.
|
* Derive further bean definitions from the configuration classes in the registry.
|
||||||
*/
|
*/
|
||||||
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) {
|
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) {
|
||||||
registry.registerBeanDefinition(IMPORT_AWARE_PROCESSOR_BEAN_NAME,
|
RootBeanDefinition iabpp = new RootBeanDefinition(ImportAwareBeanPostProcessor.class);
|
||||||
new RootBeanDefinition(ImportAwareBeanPostProcessor.class));
|
iabpp.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
|
||||||
|
registry.registerBeanDefinition(IMPORT_AWARE_PROCESSOR_BEAN_NAME, iabpp);
|
||||||
|
|
||||||
int registryId = System.identityHashCode(registry);
|
int registryId = System.identityHashCode(registry);
|
||||||
if (this.registriesPostProcessed.contains(registryId)) {
|
if (this.registriesPostProcessed.contains(registryId)) {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
@@ -217,6 +219,7 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
|
|||||||
"postProcessBeanFactory already called for this post-processor against " + registry);
|
"postProcessBeanFactory already called for this post-processor against " + registry);
|
||||||
}
|
}
|
||||||
this.registriesPostProcessed.add(registryId);
|
this.registriesPostProcessed.add(registryId);
|
||||||
|
|
||||||
processConfigBeanDefinitions(registry);
|
processConfigBeanDefinitions(registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user