spring注解@service("service")括号中的service有什么用


相当于 xml配置中得

bean id = service

也可以不指定

不指定相当于
bean id = com. service.service
就是这个类的全限定名

好处是:
同一个接口可以有多个实现方法,使用不同的注解value ,可以调取不同实现类的方法
posted on 2017-01-19 11:16  临界  阅读(655)  评论(0编辑  收藏  举报