Through my earlier posts we have learnt about Spring Setter Injection and all its types, in setter injection we will be having the POJO’s for all the property which is present in the class, whereas in Constructor Injection we will have the parameterized constructors which will be setting values to the properties. We will be using <constructor-arg> tag to achieve it. [Read more…]
Previously we have let about Spring Dependency Injection With List Collection, There will not be much of difference between list and set,except we will be having Set in all the places of list. Lets see how to inject values to the Set Collection. We will be injecting String values to a Set and Objects to another Set using <set> tag in our configuration file. [Read more…]
Dependency Injection(DI) or Inversion of Control(IoC) is the prominent feature of Spring Framework. Dependency Injection is a design pattern which removes the dependency between objects so that our code becomes loosely coupled. In Spring there exist two major types of Dependency 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…]