Closed
Description
Dave Syer opened SPR-12486 and commented
A nested static class inside @Configuration
is considered for inclusion in the bean factory, and if it is a @Component
you get a bean definition, but the @Scope
on the class is ignored. A bean that is created by a component scan does not behave this way (I presume), neither does it when added explicitly to the bean factory (e.g. in the constructor of AnnotationConfigApplicationContext).
I think #16497 refers obliquely to this problem. #13365 also looks relevant.
Affects: 4.1.2
Reference URL: spring-attic/spring-framework-issues#88
Issue Links:
- @Configuration should respect @DependsOn on imported or nested classes as well [SPR-11883] #16502
@Configuration
should respect@DependsOn
on imported or nested classes as well
Referenced from: commits c5c5473