`

expected single matching bean but found 2

    博客分类:
  • JAVA
阅读更多

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

 

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

 

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics