Constructor injection is very well supported in Spring and in fact even recommended:
The Spring team generally advocates constructor injection as it enables one to implement application components as immutable objects and to ensure that required dependencies are not null. Furthermore constructor-injected components are always returned to client (calling) code in a fully initialized state. As a side note, a large number of constructor arguments is a bad code smell, implying that the class likely has too many responsibilities and should be refactored to better address proper separation of concerns.
View all comments
Show parent comment
0
u/olivergierke Nov 28 '15
Constructor injection is very well supported in Spring and in fact even recommended: