***************************APPLICATION FAILED TO START***************************Description:Parameter 0 of constructor in com.fangly.upms.impl.controller.SysMenuController required a single bean, but 2 were found:- sysMenuServiceImpl: defined in file [D:\myProject\fangly-scafford-project\fangly-scaffold\fangly-upms\fangly-upms-impl\target\classes\com\fangly\upms\impl\service\impl\SysMenuServiceImpl.class]- sysMenuService: defined in file [D:\myProject\fangly-scafford-project\fangly-scaffold\fangly-upms\fangly-upms-impl\target\classes\com\fangly\upms\impl\service\SysMenuService.class]Action:Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumedDisconnected from the target VM, address: '127.0.0.1:64008', transport: 'socket'Process finished with exit code 1
搭项目的时候遇到报错,觉得很奇怪,然后进行问题排查,发现是@mapperScan的扫描范围过大导致,把扫描范围改小就好了。
将其改为:
@MapperScan("com.fangly.upms.impl.mapper")
报错消失。
版权声明:本文为weixin_42615847原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。原文链接:https://blog.csdn.net/weixin_42615847/article/details/110927876【文章转自:香港多IP服务器 http://www.558idc.com/hkzq.html提供,感恩】