• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

constructor-arg, property relation in spring

I was reading following lines and I did not understand clearly.

Notice that <constructor-arg> can take a <ref> element just like <property> does.
In fact, you can use any of the same sub elements you used with <property> in the
same way when setting constructor arguments with <constructor-arg>.


Any ideas, resources,sample code,links, highly appreciated. thanks in advance.
0
gudii9
Asked:
gudii9
  • 2
1 Solution
 
objectsCommented:
its just saying you can pass beans to your constructor wiring in exactly the same way you pass then to your setter
0
 
gudii9Author Commented:
>> exactly the same way you pass then to your setter

i do not see any where setter in above description. you mean property. please advise
0
 
objectsCommented:
properties are set using setter methods

public void setBlah(MyBean blah) {
   this.blah = blah);
}
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now