Blogger

Delete comment from: Javarevisited

javin paul said...

@Chiranjeevi, Setter injection relies on calling setXXX() method, so if client doesn't call them then class will be without that dependency. Constructor injection makes it mandatory to supply dependency. It will not let you to create class without those dependencies.

Jan 5, 2016, 7:12:12 AM


Posted to Difference between Setter vs Constructor Injection in Spring

Google apps
Main menu