4 ms·
> If your classes take their dependencies as constructor parameters, everything is much more explicit. This is the guidance that Spring team members give, to t
by jacques_chester 9y ago
> If your classes take their dependencies as constructor parameters, everything is much more explicit.
This is the guidance that Spring team members give, to the point that Spring now defaults to injecting constructors without annotations.
I agree that field/setter autowiring is Satan's handicraft.
Not all of this is Spring's fault. Java has the JavaBeans standard, which created a universe in which setter injection is common. JPA, for example, requires no-arg constructors. It makes me sad.