|
37 | 37 | import org.springframework.beans.factory.BeanDefinitionStoreException;
|
38 | 38 | import org.springframework.beans.factory.BeanFactory;
|
39 | 39 | import org.springframework.beans.factory.BeanFactoryAware;
|
40 |
| -import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor; |
41 | 40 | import org.springframework.beans.factory.config.BeanDefinition;
|
42 | 41 | import org.springframework.beans.factory.config.BeanDefinitionHolder;
|
43 | 42 | import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
|
91 | 90 | public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPostProcessor,
|
92 | 91 | PriorityOrdered, ResourceLoaderAware, BeanClassLoaderAware, EnvironmentAware {
|
93 | 92 |
|
94 |
| - private static final String IMPORT_AWARE_PROCESSOR_BEAN_NAME = |
95 |
| - ConfigurationClassPostProcessor.class.getName() + ".importAwareProcessor"; |
96 |
| - |
97 | 93 | private static final String IMPORT_REGISTRY_BEAN_NAME =
|
98 | 94 | ConfigurationClassPostProcessor.class.getName() + ".importRegistry";
|
99 | 95 |
|
| 96 | + private static final String IMPORT_AWARE_PROCESSOR_BEAN_NAME = |
| 97 | + ConfigurationClassPostProcessor.class.getName() + ".importAwareProcessor"; |
| 98 | + |
100 | 99 | private static final String ENHANCED_CONFIGURATION_PROCESSOR_BEAN_NAME =
|
101 | 100 | ConfigurationClassPostProcessor.class.getName() + ".enhancedConfigurationProcessor";
|
102 | 101 |
|
@@ -260,6 +259,7 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
|
260 | 259 | // Simply call processConfigurationClasses lazily at this point then.
|
261 | 260 | processConfigBeanDefinitions((BeanDefinitionRegistry) beanFactory);
|
262 | 261 | }
|
| 262 | + |
263 | 263 | enhanceConfigurationClasses(beanFactory);
|
264 | 264 | }
|
265 | 265 |
|
@@ -455,10 +455,10 @@ public Object postProcessAfterInitialization(Object bean, String beanName) {
|
455 | 455 | /**
|
456 | 456 | * {@link InstantiationAwareBeanPostProcessorAdapter} that ensures
|
457 | 457 | * {@link EnhancedConfiguration} beans are injected with the {@link BeanFactory}
|
458 |
| - * before the {@link AutowiredAnnotationBeanPostProcessor} runs (SPR-10668). |
| 458 | + * before the {@code AutowiredAnnotationBeanPostProcessor} runs (SPR-10668). |
459 | 459 | */
|
460 | 460 | private static class EnhancedConfigurationBeanPostProcessor extends InstantiationAwareBeanPostProcessorAdapter
|
461 |
| - implements PriorityOrdered, BeanFactoryAware { |
| 461 | + implements BeanFactoryAware, PriorityOrdered { |
462 | 462 |
|
463 | 463 | private BeanFactory beanFactory;
|
464 | 464 |
|
|
0 commit comments