Dependency Injection Concept
Nov 30th, 2009 | By admin | Category: SpringJava classes and objects should be as much as possible loosely coupled with other java classes and objects. The loosely-coupled behavior allows a Java code to be re-usable ,test-worthy , modular and well maintained. Often , A class depends on another class and arise the coupling .
Dependency Injection(DI) mechanism helps to introduce the loose coupling which makes your code more modular and testable.
The container which supports this dependency injection concept is called the IOC (Inversion of control) Container. Spring uses the concept of IOC and dependency injection to locate and inject services for you.
Read more to know more