Java - Spring - @Component Stereotypes (@Controller - @Service - @Repository)
Annotation | Meaning |
---|---|
@Component | generic stereotype for any Spring-managed component |
@Repository | stereotype for persistence layer |
@Service | stereotype for service layer |
@Controller | stereotype 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
, multiple selections available,