Work in progress, this post is still in ‘work in progress’ status

@Autowired Injection

Avoid field and setter injection

It should be used only for optional dependencies or in test code.

Good

Bad

References

Use constructor injection

Good

References

Avoid the use of @Value in Spring Boot

Spring Boot introduced the @ConfigurationProperties annotation that is ‘far more superior than the basic @Value approach’ according to Stéphane Nicoll (Pivotal).

The advantages:

Here you can find the documentation: