I\'m learning Spring 3 and I don\'t seem to grasp the functionality behind
and
.
As a complementary, you can use @ComponentScan
to use
in annotation way.
It's also described at spring.io
Configures component scanning directives for use with @Configuration classes. Provides support parallel with Spring XML's element.
One thing to note, if you're using Spring Boot, the @Configuration and @ComponentScan can be implied by using @SpringBootApplication annotation.