expected single matching bean but found 2: menusServiceImpl,IMenusService

问题如下:

接口也作为匹配的bean?

有点迷惑了。。。。。。。

经过在网上找资料,发现和@MapperScan这个注解有关系,具体源码不知。但是这个注解会扫描路径下的所有类。

去掉这个注解就可以正常使用了;至于具体原因待查。

 

posted @ 2020-04-28 11:04  PerfectLi  阅读(818)  评论(0编辑  收藏  举报