Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

interface injection

I would like to know interface injection. I was reading as
Interface Injection-- Injection is done through an interface which is not supported in spring. I am not clear on this concept. why spring does not support it. what are the advantages, disadvantages, uses of it. when where how we use it. thanks in advance
0
gudii9
Asked:
gudii9
2 Solutions
 
for_yanCommented:
read about interface inection in general here:
http://blogs.oracle.com/jrose/entry/interface_injection_in_the_vm


and as it realtes to Spring here:

http://namanmehta.blogspot.com/2010/01/interface.html
0
 
gudii9Author Commented:

>>>There are three types of Dependency Injections.

Type 1 IOC also called Interface Injection In Type 1 IOC the injection is done though an interface. The interface will define the injection method and the implementation class has to implement this interface and provide concrete implementation for the injection method.
Type 2 IOC also called Setter Injection In Type 2 IOC the injection is done via a setter method. Type 2 IOC uses setter methods to get the dependent classes it needs.
Type 3 IOC also called Constructor Injection. In Type 3 IOC implementing class defines a constructor to get all its dependents. The dependent classes are defined in the constructor arguments.





are they only 3 tyoes. I remember reading more than 3. please advise
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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