AnnotationConfigWebApplicationContext allows for repeated register/scan calls
Restoring consistency with AnnotationConfigApplicationContext. Issue: SPR-10852
This commit is contained in:
@@ -120,7 +120,7 @@ public class AnnotationConfigApplicationContext extends GenericApplicationContex
|
||||
public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) {
|
||||
this.reader.setBeanNameGenerator(beanNameGenerator);
|
||||
this.scanner.setBeanNameGenerator(beanNameGenerator);
|
||||
this.getBeanFactory().registerSingleton(
|
||||
getBeanFactory().registerSingleton(
|
||||
AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, beanNameGenerator);
|
||||
}
|
||||
|
||||
@@ -137,9 +137,9 @@ public class AnnotationConfigApplicationContext extends GenericApplicationContex
|
||||
|
||||
/**
|
||||
* Register one or more annotated classes to be processed.
|
||||
* Note that {@link #refresh()} must be called in order for the context to fully
|
||||
* process the new class.
|
||||
* <p>Calls to {@link #register} are idempotent; adding the same
|
||||
* Note that {@link #refresh()} must be called in order for the context
|
||||
* to fully process the new class.
|
||||
* <p>Calls to {@code register} are idempotent; adding the same
|
||||
* annotated class more than once has no additional effect.
|
||||
* @param annotatedClasses one or more annotated classes,
|
||||
* e.g. {@link Configuration @Configuration} classes
|
||||
|
||||
Reference in New Issue
Block a user