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 on GenericApplicationContext performs default instantiation only. Making GenericApplicationContext.registerBean smarter in detecting a Kotlin primary constructor or simple non-default public constructor scenarios makes it aligned with AnnotationConfigApplicationContext and more useful in general, in particular for Kotlin DSLs.
Issue Links:
Referenced from: commits 47d6e91, d3c0855
Juergen Hoeller opened SPR-17292 and commented
While
AnnotationConfigApplicationContext.registerBeansupports@Autowiredresolution on constructors in case of no instance supplier given, the original method onGenericApplicationContextperforms default instantiation only. MakingGenericApplicationContext.registerBeansmarter in detecting a Kotlin primary constructor or simple non-default public constructor scenarios makes it aligned withAnnotationConfigApplicationContextand more useful in general, in particular for Kotlin DSLs.Issue Links:
Referenced from: commits 47d6e91, d3c0855