• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
October 17, 2022 |690 Views
Setter Injection in Spring with Example
Description
Discussion

The process of arranging the dependent class object to the target class object, so that the target class can use the services of the dependent class is called dependency injection. 

Two types of Dependency Injection are available in Spring Framework, 

1. Setter Dependency Injection, and 
2. Constructor Dependency Injection 

In setter injection, the IoC container uses the setter method of the bean class to inject dependencies into it. 
Setter injection allows the following properties: 

1. Object/reference type values 
2. Simple/primitive values 
3. Collection 

So in this video, let's look at the detailed explanation of Setter Dependency Injection in Spring with an Example.

Spring Dependency Injection with Example: https://www.geeksforgeeks.org/spring-dependency-injection-with-example/ 
Spring – Dependency Injection by Setter Method: https://www.geeksforgeeks.org/spring-dependency-injection-by-setter-method/

Read More