GenericApplicationContext.registerBean should support non-default constructors [SPR-17292] #21825
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Juergen Hoeller opened SPR-17292 and commented
While
AnnotationConfigApplicationContext.registerBean
supports@Autowired
resolution on constructors in case of no instance supplier given, the original method onGenericApplicationContext
performs default instantiation only. MakingGenericApplicationContext.registerBean
smarter in detecting a Kotlin primary constructor or simple non-default public constructor scenarios makes it aligned withAnnotationConfigApplicationContext
and more useful in general, in particular for Kotlin DSLs.Issue Links:
Referenced from: commits 47d6e91, d3c0855
The text was updated successfully, but these errors were encountered: