Spring Boot best practices summary
This document is an extension of the Software engineering best practices summary, dedicated to Spring Boot-specific issues.
General
- Disable Open-Session-In-View
Object creation
- Don’t use Field Injection, pass all dependencies in the class constructor
- Read more:
Why field injection is evil – http://olivergierke.de
- Read more:
- Do not add the @Autowired annotation on constructors – it is now obsolete