问题如下:

expected single matching bean but found 2: menusServiceImpl,IMenusService

 

 接口也作为匹配的bean?

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

经过在网上找资料,发现和@MapperScan这个注解有关系,具体源码不止。但是这个注解会扫描路径下的所有类。expected single matching bean but found 2: menusServiceImpl,IMenusService

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

expected single matching bean but found 2: menusServiceImpl,IMenusService

 

相关文章: