expected single matching bean but found 2

今天写完两个service实现,启动项目发现了这个错

expected single matching bean but found 2: [oldFrSplittinglogServiceImpl, frSplittinglogServiceImpl]

后来发现,我两个实现类,实现了同一个接口,然后又都用的是@Autowired, 所以报了这个错,提示不能自动注入,发现两个bean

猜你喜欢

转载自it1990eye0920.iteye.com/blog/2281840
今日推荐