|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2017 the original author or authors. |
| 2 | + * Copyright 2002-2018 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
64 | 64 | import org.springframework.util.Assert;
|
65 | 65 | import org.springframework.util.ClassUtils;
|
66 | 66 |
|
67 |
| -import static org.springframework.context.annotation.AnnotationConfigUtils.*; |
| 67 | +import static org.springframework.context.annotation.AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR; |
68 | 68 |
|
69 | 69 | /**
|
70 | 70 | * {@link BeanFactoryPostProcessor} used for bootstrapping processing of
|
|
74 | 74 | * {@code <context:component-scan/>}. Otherwise, may be declared manually as
|
75 | 75 | * with any other BeanFactoryPostProcessor.
|
76 | 76 | *
|
77 |
| - * <p>This post processor is {@link Ordered#HIGHEST_PRECEDENCE} as it is important |
78 |
| - * that any {@link Bean} methods declared in Configuration classes have their |
79 |
| - * respective bean definitions registered before any other BeanFactoryPostProcessor |
80 |
| - * executes. |
| 77 | + * <p>This post processor is priority-ordered as it is important that any |
| 78 | + * {@link Bean} methods declared in {@code @Configuration} classes have |
| 79 | + * their corresponding bean definitions registered before any other |
| 80 | + * {@link BeanFactoryPostProcessor} executes. |
81 | 81 | *
|
82 | 82 | * @author Chris Beams
|
83 | 83 | * @author Juergen Hoeller
|
@@ -115,10 +115,10 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
|
115 | 115 |
|
116 | 116 | private boolean localBeanNameGeneratorSet = false;
|
117 | 117 |
|
118 |
| - /* using short class names as default bean names */ |
| 118 | + /* Using short class names as default bean names */ |
119 | 119 | private BeanNameGenerator componentScanBeanNameGenerator = new AnnotationBeanNameGenerator();
|
120 | 120 |
|
121 |
| - /* using fully qualified class names as default bean names */ |
| 121 | + /* Using fully qualified class names as default bean names */ |
122 | 122 | private BeanNameGenerator importBeanNameGenerator = new AnnotationBeanNameGenerator() {
|
123 | 123 | @Override
|
124 | 124 | protected String buildDefaultBeanName(BeanDefinition definition) {
|
@@ -382,6 +382,7 @@ else if (logger.isWarnEnabled() && beanFactory.containsSingleton(beanName)) {
|
382 | 382 | // nothing to enhance -> return immediately
|
383 | 383 | return;
|
384 | 384 | }
|
| 385 | + |
385 | 386 | ConfigurationClassEnhancer enhancer = new ConfigurationClassEnhancer();
|
386 | 387 | for (Map.Entry<String, AbstractBeanDefinition> entry : configBeanDefs.entrySet()) {
|
387 | 388 | AbstractBeanDefinition beanDef = entry.getValue();
|
|
0 commit comments