What are the types of Dependency Injection supported by spring?

devquora
devquora

Posted On: Feb 22, 2018

 

 There is two Dependency Injection that is supported by spring.
  • Setter Injection : Setter based Dependency Injection can be initialized by calling setter methods on the beans of the user after starting a no argument constructor to initialize their bean.
  • Constructor Injection: Constructor based Dependency Injection is initialized by starting a constructor with a number of arguments, each working as a collaborator.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Spring Interview Questions

    What are the features/ characteristics of spring?

    The important features of spring are as follows:Lightweight: Considering transparency and size, spring is lightweight..

    Spring Interview Questions

    How many types of modules are there in spring? Name them.

    There are around twenty modules, which can be categorized into Core Container, Web, Data Access or Integration, Aspect ..

    Spring Interview Questions

    What do you mean by Spring Java Based Configuration?

    Spring configuration files are XML files. These files contain the information of classes and describe how these classes..