I\'m learning Spring 3 and I don\'t seem to grasp the functionality behind and .
: Scanning and activating annotations for already registered beans in spring config xml.
: Bean registration +
@Autowired and @Required are targets property level so bean should register in spring IOC before use these annotations. To enable these annotations either have to register respective beans or include . i.e. works with registered beans only.
@Required enables RequiredAnnotationBeanPostProcessor processing tool
@Autowired enables AutowiredAnnotationBeanPostProcessor processing tool
Note: Annotation itself nothing to do, we need a Processing Tool, which is a class underneath, responsible for the core process.
@Repository, @Service and @Controller are @Component, and they targets class level.
it scans the package and find and register the beans, and it includes the work done by .
Migrating XML to Annotations