Constructor vs Setter dependency Injection in Spring

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

Constructor vs Setter dependency Injection in Spring

Spring framework uses Dependency Injection and inversion of control design principle to manage objects Now to inject dependency it primarily uses Cons
http://javarevisited.blogspot.com/2012/11/difference-between-setter-injection-vs-construct...
  • Total Hits: 16017

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 146 votes

  • Category: JAVA/Spring

  • Submitted on: 2013-05-31 13:35:20

  • Submitted By: Javin Paul

  • Set as Favorite

Description:

Spring framework uses Dependency Injection and inversion of control design principle to manage objects Now to inject dependency it primarily uses Constructor Injection and Setter injection. This article explains what is constructor and setter injection, difference between Constructor vs Setter injection, and When to use them in spring based Java project.    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 36.99%  54
 Two starsTwo star  Vote LeftVote MiddleVote Right 10.96%  16
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 12.33%  18
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 10.27%  15
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 29.45%  43

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.






Advertisements