A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Setter Injection V/S Constructor Injection
Vaibhav G Garg
Joined: Sep 23, 2011
May 14, 2013 13:00:44
I would like to know when we should be using Setter Injection?
And, in which case, we should use Constructor Injection?
Joined: Mar 28, 2008
May 14, 2013 14:36:22
This question has been asked many many many times over the years. A little research would give you loads of reading material.
On this forum:
On the wider internet:
Tim Driven Development
I agree. Here's the link:
subject: Setter Injection V/S Constructor Injection
I need help - basic stuff (I think)
why we do not need getter method for variable ?
Setter based vs. Constructor based injection
DI - Constructor injection / Setter Injection ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014