The Spring Framework provides lots of annotations to configure the metadata for beans. However, we'll focus on the most commonly used annotations: @Autowired, @Qualifier, @Inject, @Resource, @Primary, and @Value.
How to use @Autowired
The @Autowired annotation allows you to define the configuration part in a bean's class itself instead of writing a separate configuration class annotated with @Configuration. The @Autowired annotation can be applied to a field (as we saw in the class property-based dependency injection example), constructor, setter, or any method.
The Spring container makes use of reflections to inject the beans annotated with @Autowired. This also makes it more costly than other injection approaches.
Please make a note that applying @Autowired to class members will only work if there is no constructor or setter method to inject the dependent bean.
https://docs.spring.io/spring-framework/docs/2.0.x/reference/metadata.html