Improve documentation for JavaConfig's use of CGLIB for all @Configuration annotated classes [SPR-6885] #11551
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Michael Isvy opened SPR-6885 and commented
All
@Configuration
classes are dynamically subclassed with CGLIB, and the MethodInterceptor that is applied in the overridden versions of all@Bean
methods check the container first for any cached (scoped) beans, of course including singletons.See ConfigurationClassEnhancer and BeanMethodInterceptor for details.
For this reason,
@Configuration
classes have certain restrictions, such as that they (and their@Bean
methods) may not be final; they must have a no-arg constructor, etc.Referenced from: commits 9e5b129, 6af9177
The text was updated successfully, but these errors were encountered: