Skip to content

Support autowiring by constructor in Kotlin bean DSL [SPR-16014] #20563

@spring-projects-issues

Description

@spring-projects-issues

Sébastien Deleuze opened SPR-16014 and commented

After the blog post presenting the Kotlin bean definition DSL, we had a lot of feedbacks and improvement requests about Routes(ref(), ref()) syntax, and even if ref() is valid, such declaration frequently used for constructor injection deserve a better syntax.

By enabling constructor autowiring by default (which make sense in Kotlin) and allowing easily to customize the autowireMode we can significantly improve syntax and readability of Kotlin bean definition DSL.


Affects: 5.0 RC4

Reference URL: https://spring.io/blog/2017/08/01/spring-framework-5-kotlin-apis-the-functional-way#functional-bean-definitions-with-spring-rsquo-s-new-kotlin-dsl

Referenced from: commits fbb428f, 23497a7

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions