According to @Autowired javadoc:
Marks a constructor, field, setter method, or customization method to be automatically through Spring dependency injection tools. Only one constructor (in max) of any given bean class can contain this annotation, indicating a constructor for auto-device when used as a Spring bean. Such a constructor should not be publicly available. Fields are entered immediately after the bean is built, before any configuration methods are called. Such a config does not have to be public. Customization methods can have an arbitrary name and any number of arguments; each of these arguments will be auto-validated using the corresponding bean in the Spring container.
Bean property setting methods are actually just a special case of such a general configuration method. Such configuration methods do not have to be publicly available. In the case of multiple argument methods, the parameter 'required' is equal applicable for all arguments. In the case of a collection or map, the dependency type, the container will auto-increment all beans corresponding to the declared value type. In the case of a Map, keys must be declared as a String type and will be resolved to the corresponding bean names. Note that the actual injection is done through a BeanPostProcessor, which in turn means that you cannot use @Autowired to inject links into a BeanPostProcessor or BeanFactoryPostProcessor. Consult javadoc for the AutwiredAnnotationBeanPostProcessor class (which, by default, checks for the presence of this annotation).
, ? , , setter @Autowired @Autowired . , setter Spring bean, randomAutowred , ? Spring , @Autowired (seters), ? javadoc, ,
Bean
, Spring , , Spring javadocs.