Spring Dependency Injection – Setter Injection

Dependency Injection is the most important concept of the Spring. It is also called as Inversion of Control (IoC). Dependency Injection makes our code Loosely Coupled, Spring’s IOC container is light-weight and it manages the dependency between objects using configurations. It connects the related objects together, instantiates and supplies them based on configuration. Spring DI can be configured in two different way XML Based (Spring-configuration xml) and Annotation based. [Read more…]