Polishing
This commit is contained in:
@@ -40,8 +40,13 @@ import org.springframework.core.annotation.AnnotationUtils;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Enhances {@link Configuration} classes by generating a CGLIB subclass capable of
|
||||
* interacting with the Spring container to respect bean semantics.
|
||||
* Enhances {@link Configuration} classes by generating a CGLIB subclass which
|
||||
* interacts with the Spring container to respect bean scoping semantics for
|
||||
* {@code @Bean} methods. Each such {@code @Bean} method will be overridden in
|
||||
* the generated subclass, only delegating to the actual {@code @Bean} method
|
||||
* implementation if the container actually requests the construction of a new
|
||||
* instance. Otherwise, a call to such an {@code @Bean} method serves as a
|
||||
* reference back to the container, obtaining the corresponding bean by name.
|
||||
*
|
||||
* @author Chris Beams
|
||||
* @author Juergen Hoeller
|
||||
@@ -104,7 +109,7 @@ class ConfigurationClassEnhancer {
|
||||
private Enhancer newEnhancer(Class<?> superclass) {
|
||||
Enhancer enhancer = new Enhancer();
|
||||
enhancer.setSuperclass(superclass);
|
||||
enhancer.setInterfaces(new Class<?>[]{EnhancedConfiguration.class});
|
||||
enhancer.setInterfaces(new Class<?>[] {EnhancedConfiguration.class});
|
||||
enhancer.setUseFactory(false);
|
||||
enhancer.setNamingPolicy(SpringNamingPolicy.INSTANCE);
|
||||
enhancer.setCallbackFilter(CALLBACK_FILTER);
|
||||
|
||||
Reference in New Issue
Block a user