Types of Dependency Injection Spring supports

Define the types of Dependency Injection Spring supports briefly?

E

Expert

Verified

a) Setter Injection:-
The Setter-based DI is recognised by calling a setter methods on beans after invoking - no-argument static factory method to instantiate the bean.
b) Constructor Injection:-
Constructor-based DI is recognised by invoking a constructor with number of arguments, each demonstrating a collaborator.

   Related Questions in JAVA Programming

©TutorsGlobe All rights reserved 2022-2023.