SpringBoot项目启动异常 - required a single bean, but 2 were found

项目中只有注入spring一个bean,报错一直提示两个;怀疑是注入两次

包扫描时候 注解SpringBootApplication和注解MapperScan各扫描了一次

问题解决:将MapperScan注解指定到mapper层解决


感谢: https://www.jianshu.com/p/b636c2045916  这位兄弟的博客

你可能感兴趣的:(SpringBoot项目启动异常 - required a single bean, but 2 were found)