From 322b0f431f0b672252b53669c3b16aa44561be6e Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 19 Jul 2018 11:59:40 +0200 Subject: [PATCH] Javadoc update: ConfigurationClassPostProcessor is priority-ordered Issue: SPR-17062 (cherry picked from commit c66f9d8) --- .../ConfigurationClassPostProcessor.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java index c019c61d52..5ec6846ab1 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,7 +64,7 @@ import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; -import static org.springframework.context.annotation.AnnotationConfigUtils.*; +import static org.springframework.context.annotation.AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR; /** * {@link BeanFactoryPostProcessor} used for bootstrapping processing of @@ -74,10 +74,10 @@ import static org.springframework.context.annotation.AnnotationConfigUtils.*; * {@code }. Otherwise, may be declared manually as * with any other BeanFactoryPostProcessor. * - *

This post processor is {@link Ordered#HIGHEST_PRECEDENCE} as it is important - * that any {@link Bean} methods declared in Configuration classes have their - * respective bean definitions registered before any other BeanFactoryPostProcessor - * executes. + *

This post processor is priority-ordered as it is important that any + * {@link Bean} methods declared in {@code @Configuration} classes have + * their corresponding bean definitions registered before any other + * {@link BeanFactoryPostProcessor} executes. * * @author Chris Beams * @author Juergen Hoeller @@ -115,10 +115,10 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo private boolean localBeanNameGeneratorSet = false; - /* using short class names as default bean names */ + /* Using short class names as default bean names */ private BeanNameGenerator componentScanBeanNameGenerator = new AnnotationBeanNameGenerator(); - /* using fully qualified class names as default bean names */ + /* Using fully qualified class names as default bean names */ private BeanNameGenerator importBeanNameGenerator = new AnnotationBeanNameGenerator() { @Override protected String buildDefaultBeanName(BeanDefinition definition) { @@ -382,6 +382,7 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo // nothing to enhance -> return immediately return; } + ConfigurationClassEnhancer enhancer = new ConfigurationClassEnhancer(); for (Map.Entry entry : configBeanDefs.entrySet()) { AbstractBeanDefinition beanDef = entry.getValue();