What are the different types of dependency injection supported in Spring?
Answered
What are the different types of dependency injection supported in Spring?
Best answer
Spring framework supports two types of Dependency Injection
• Constructor Injection – Dependencies are provided by constructor parameters
• Setter Injection – Dependencies are assigned through setter methods (Java Beans properties) after object instantiation using a no argument constructor