Spring MVC常用的注解整理

一、组件型注解: @Component 在类定义之前添加@Component注解,他会被spring容器识别,并转为bean。 @Repository 对Dao实现类进行注解 (特殊的@Component) @Service 用于对业务逻辑层进行注解, (特殊的@Component) @Controller 用于控制层注解 , (特殊的@Component)  以上四种注解都是注解在类上的,被注解
相关文章
相关标签/搜索