描述下@Component,@Repository,@Service,@Scope,@Autowired,@Inject,@Value标记的作用

  1.@Component为通用注解。

  2.@Repository为持久层组件注解。

  3.@Service为业务层组件注解。

  4.@Scope为Bean的作用域注解。

  5.@Autowired,@Inject为指定Bean之间依赖关系的注解。

  6.@Value为注入Spring表达式值的注解。

posted @ 2018-03-07 15:05  连接中  阅读(181)  评论(0编辑  收藏  举报