Skip to content
This repository was archived by the owner on Jul 22, 2019. It is now read-only.

Replace lateinit binding of dependencies with constructor-injection#1292

Open
geoand wants to merge 1 commit intojabbink:developfrom
geoand:autowire-removal
Open

Replace lateinit binding of dependencies with constructor-injection#1292
geoand wants to merge 1 commit intojabbink:developfrom
geoand:autowire-removal

Conversation

@geoand
Copy link
Copy Markdown

@geoand geoand commented Sep 16, 2016

It is considered good practice in Spring applications to use
constructor injection whenever possible (the main reasons are better
readability and testability of classes).
Moreover, starting with 4.3.RC1 version of Spring, the @Autowired
annotation is no longer needed when a class has a single constructor.
Leveraging this fact along with Kotlin's very concise constructor
syntax yields some nice readability improvements

It is considered good practice in Spring applications to use
constructor injection whenever possible (the main reasons are better
readability and testability of classes).
Moreover, starting with 4.3.RC1 version of Spring, the @Autowired
annotation is no longer needed when a class has a single constructor.
Leveraging this fact along with Kotlin's very concise constructor
syntax yields some nice readability improvements
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants