Java - Spring - @Component Stereotypes (@Controller - @Service - @Repository)

Java - Spring - @Component Stereotypes (@Controller - @Service - @Repository)

AnnotationMeaning
@Componentgeneric stereotype for any Spring-managed component
@Repositorystereotype for persistence layer
@Servicestereotype for service layer
@Controllerstereotype for presentation layer (spring-mvc)

these stereotype annotations make ideal targets for pointcuts. @Repository@Service, and @Controller can also carry additional semantics in future releases of the Spring Framework