Meaningless Drivel is fun!*
The moose likes Spring and the fly likes overloaded constructor in constructor injection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "overloaded constructor in constructor injection" Watch "overloaded constructor in constructor injection" New topic
Author

overloaded constructor in constructor injection

siri Makkapati
Greenhorn

Joined: May 29, 2012
Posts: 1
Hi all,

can any one please let me know For dependincy injection using constructor , if i have two overloaded constructors in class , how do you make sure that a particular version of constructor is invoked .

regards,
Sireesha
Reginald Blank
Greenhorn

Joined: Mar 11, 2011
Posts: 17
In the single page Spring 3.1 docs:

http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/htmlsingle/spring-framework-reference.html

The end of the following section answers your question:

http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/htmlsingle/spring-framework-reference.html#beans-constructor-injection
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: overloaded constructor in constructor injection
 
Similar Threads
WA #1.....word association
DI - Constructor injection / Setter Injection ?
this(Color.Red) ?
mocking time
Constructor overloading