Friday, July 26, 2013

Java Spring note

http://www.tutorialspoint.com/spring/index.htm

Dependency injection can happen in the way of passing parameters to the constructor or by post-construction using setter methods.
You can mix both, Constructor-based and Setter-based DI but it is a good rule of thumb to use constructor arguments for mandatory dependencies and setters for optional dependencies.

No comments:

Post a Comment