This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

spring autowiring by name  RSS feed

 
anish reddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iam beginner to spring,iam unable to understand spring autowiring by name can any one give example program on it.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give a bean an id, call it "foo".

Give another bean "bar" a property called "foo". Create a "bar", its "foo" property will be injected with the implementation defined in the "foo" bean.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!