致梦想

spring自动注解Autowired配置

1.spring注解:http://blog.csdn.net/xyh820/article/details/7303330/

2.最简ssm配置:http://blog.csdn.net/qq_18279123/article/details/61200873

3.spring Autowired自动注解与装配:http://blog.csdn.net/heyutao007/article/details/5981555

关于@Repository、@Service 和 @Controller 和 @Component四个注解的使用情形 
在持久层、业务层和控制层分别采用 @Repository、@Service 和 @Controller 对分层中的类进行注释,而用 @Component 对那些比较中立的类进行注释.这里就是说把这个类交给Spring管理,重新起个名字叫userManager,由于不好说这个类属于哪个层面,就用@Component.

 

posted on 2017-10-09 13:49  致梦想  阅读(245)  评论(0编辑  收藏  举报

导航