Spring的bean管理-使用注解定义Bean

  • Spring2.5引入使用注解去定义Bean
  • 除了@Component外,Spring提供了3个功能基本和@Component等效的注解

    — @Repository用于对DAO实现类进行标注

    — @Service用于对Service实现类进行标注

    — @Controller用于对Controller实现类进行标注

posted @ 2019-08-21 16:19  鸿森  阅读(372)  评论(0编辑  收藏  举报