Closed
Description
Eberhard Wolff opened SPR-7170 and commented
In JavaConfig beans created by protected methods with @Bean
annotation had visibility inside the @Configuration
class only but were not exported into the global ApplicationContext
and therefore cannot be referenced from there or other @Configuration
annotated classes:
@Configuration
public class MyConfiguration {
@Bean
public ABean globallyVisible() { ... }
@Bean
protected ABean visibleOnlyInThisClass() { ... }
}
This is great to structure large configuration because beans can be hidden. Bring that feature back please.
Affects: 3.0 GA, 3.0.1, 3.0.2
Issue Links:
- Revised support for bean definition visibility and overriding [SPR-8189] #12839 Revised support for bean definition visibility and overriding ("is depended on by")
- Allow to restrict the visibility of beans to a file [SPR-2861] #7548 Allow to restrict the visibility of beans to a file ("is duplicated by")
- Consider using javassist for proxy generation [SPR-5654] #10325 Consider using javassist for proxy generation
- Support profile exclusivity and/or bean definition finality [SPR-7982] #12637 Support profile exclusivity and/or bean definition finality
- Exporting / Importing beans across ApplicationContexts [SPR-4034] #8713 Exporting / Importing beans across ApplicationContexts
27 votes, 22 watchers