What are the types of dependency injections that Spring supports?

Dependency injections are supported by Spring in two ways:

Setter Injection

Setter-based DI is achieved by activating setter methods on the user’s beans after instantiating them with a no-argument function Object() { [native code] } or no-argument static factory method.

Constructor Injection

Constructor-based DI is achieved by calling a function Object() { [native code] } with several parameters, each of which represents a collaborator.