Thursday, January 2, 2014

Spring Course: V7 Constructor Arguments

 Constructor Arguments

if you have a class that has a Constructor with arguments like this

then in order to inject a bean from this class you should write this in beans.xml

we use <constructor-arg> to pass a value to the constructor, there is no need to specify the type, the name is the constructor argument name.

No comments:

Post a Comment