In today's team meeting, I learned an important that generally the constructor injection should be used as possible over setter injection.
- Historically the setter-injection camp come from spring, whereas constructor-injection camp are from pico-container and GUICE. [ref][ref-1]
- constructor injection is the way to indicate the class design problem, like if you have multiple dependnecies (usually more than three dependencies), you should re-think about the class redesign [ref][ref-2]
- More comprehensive article with bounce of refences [ref][ref-3]
But in the team meeting, my teammate argues from the unit test perspective, which I dont think it makes too much sense, as we are using Spock to deal with the unit testing, and it can handle static or private fields pretty well.