Can anyone explain me the concept of inversion of control in spring pls
Inversion of control
Collapse
X
-
The Spring manuals explain that in great detail so you're supposed to read it. TheOriginally posted by jayagowriCan anyone explain me the concept of inversion of control in spring pls
general idea of IoC or DI (Dependency Injection) is a POJO (Plain Old Java Object)
that does what it has to do given just interfaces. The IoC mechanism supplies
implementations of those interfaces and 'injects' them into the POJO; all you
have to do is define what implementation needs to be injected in a declarative
manner (outside the actual code), usually using xml files.
kind regards,
Jos -
In ejbs we have to look up the JNDI to acess the beansOriginally posted by jayagowriCan anyone explain me the concept of inversion of control in spring pls
But in the case of spring
we have various benas used .....
1 bean can look up (use) the other bean
so this look up of bean need be done by the programer by using
the registry...This is done by the sping container...
This is caled Inversion Of controlComment
-
Here is an excellent article titled:
Inversion of Control Containers and the Dependency Injection pattern
written by Martin Fowler. I believe he even coined the term "Dependency Injection". Enjoy:
Comment
Comment