2017年7月5日
摘要: 当使用@Autowired注解的属性类型为接口(接触耦合),这个接口有两个以上的实现类时,为了区分注入的是哪一个实现类,使用@Qualifier指定 CarIn接口: 实现类Car1: 实现类Car2: Boss类: ApplicationContext.xml: 测试类: 阅读全文
posted @ 2017-07-05 23:18 theLazarus 阅读(315) 评论(0) 推荐(0) 编辑