Skip to content

Commit b78dcc5

Browse files
committed
Make ConfClassPostPro Ordered.HIGHEST_PRECEDENCE
Make ConfigurationClassPostProcessor Ordered.HIGHEST_PRECEDENCE in case several BeanDefinitionRegistryPostProcessors are registered. Issue: SPR-10645
1 parent 2e2e9b8 commit b78dcc5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
* @since 3.0
8888
*/
8989
public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPostProcessor,
90-
ResourceLoaderAware, BeanClassLoaderAware, EnvironmentAware, ApplicationContextAware {
90+
ResourceLoaderAware, BeanClassLoaderAware, EnvironmentAware, ApplicationContextAware,
91+
Ordered {
9192

9293
private static final String IMPORT_AWARE_PROCESSOR_BEAN_NAME =
9394
ConfigurationClassPostProcessor.class.getName() + ".importAwareProcessor";
@@ -374,6 +375,11 @@ public void enhanceConfigurationClasses(ConfigurableListableBeanFactory beanFact
374375
}
375376
}
376377

378+
@Override
379+
public int getOrder() {
380+
return Ordered.HIGHEST_PRECEDENCE;
381+
}
382+
377383

378384
private static class ImportAwareBeanPostProcessor implements PriorityOrdered, BeanFactoryAware, BeanPostProcessor {
379385

0 commit comments

Comments
 (0)