Tag: autowiring
-

Constructor, Setter, and Field Injection
Spring gives the developer the control of how beans are wired. However, Spring also empowers developers with greater control over how beans are wired. There are a variety of options to choose from such as Constructor, Setter, and Field Injection
-

Autowiring – @Qualifier
Spring has another a annotation that we can use when we have multiple beans to inject in a dependency, this annotation is @Qualifier. This annotation gives priority to one bean over others if two o more beans of the same type are found.
-

Autowiring By Name
Autowiring by Name is an approach, while creating an bean, the dependency is injected by matching the name of the reference variable to the bean name. This means that the developer has to ensure that the variable name is the same as its bean.
-

Spring Terminology
When we start the Spring Framework, we start listening terms like Beans, Autowiring, Dependency Injection, IoC Factory, Inversion of Control, Application Context, etc. Before the go in full with Spring we need to understand them before.
