Tag Archives: IoC

Setting Set Collection Values in Spring IoC

We have learn how to set collection of type Map and List in Spring IoC. Now, in this example we will see to put Set collection values to Spring IoC bean property using Spring IoC configuration file. We will use …

Read more »

Setting Map Collection Values in Spring IoC

Previous tutorial illustrates us how to set List Collection value using Spring IoC configuration file. In this tutorial, we will learn how to set Map Collection values using Spring IoC Container Configuration file. Our bean will contain a reference of …

Read more »

Setting List Collection Values in Spring IoC

We have seen the process of setting class instances and primitive type values using Spring IoC, but can we provide a particular list of values to a bean in the form of List instance? Yes, we can. We can provide …

Read more »

Using factory class to instantiate Spring IoC beans

Previous tutorial illustrate the way in which we can specify the factory method of a bean which will be used by Spring IoC container to create instance of the bean. Spring IoC also provides facility to specify a factory class …

Read more »

Using self contain factory method to instantiate Spring IoC beans

Spring IoC provides a lot of options using which we can handle dependency injection. It also provided facility to define factory method of a bean that will be used to get instance of a bean. The factory method can be …

Read more »

Using initialization method to initialize a Spring IoC Bean

With the previous tutorial, you know the process of registering a bean class with Spring IoC container using xml configuration files. In this tutorial we will see how to define an initialization method of bean to Spring IoC, so that …

Read more »

Spring IoC Constructor Index Injection

We will learn in this tutorial to set the value of dependencies of spring bean using constructor of the bean by defining the position or sequence number of the argument in constructor. Spring IoC Constructor Index Injection is the method …

Read more »

Spring IoC Constructor Type Injection

In this tutorial, we will learn how we can provide constructor argument value of a bean using data type of argument. Spring IoC Constructor Type Injection is a method in which we provide dependency data on the basis of data …

Read more »

Spring IoC Constructor Value Injection

Spring IoC Constructor Value Injection is a method of constructor injection in which the value of the attributes of a bean are set using constructor of the class. That means the constructor of the bean must be defined to accept …

Read more »

Spring IoC Setter Bean Ref Injection

In this session we will go through an example that will make you understand Spring IoC Setter Bean Ref Injection. Bean ref injection means to to pass reference of one bean to another. So the example will show the method …

Read more »

Spring IoC Setter Value Injection

We will learn the process of setting property values of a bean using Spring IoC Setter Value Injection. For Spring IoC Setter Value Injection to work the bean class must contain setter of the property present. In the following example …

Read more »

Configuring Spring Bean and creating Spring Bean instance

This quick start will make you go through the implementations of Spring IoC example and illustrate how to configure your Spring Bean in Spring Configuration file and how to get instance of the bean using Spring IoC container. The example …

Read more »

What is Spring IoC ?

Before going through the Spring IoC tutorial, we must know what IoC is and why we use it in real life project development. IoC or Inversion of Control, is also known as Dependency Injection, is used to create loosely coupled …

Read more »