开发辅助-程序异常-required a single bean, but 2 were found

required a single bean, but 2 were found:

Field sceneService2 in com.pcitc.si.mdm.scene.controller.SceneController required a single bean, but 2 were found:

       - sceneServiceImpl: defined in file [C:\jw3\si-mdm-fss-center-oop\si-mdm-server-oop\target\classes\com\pcitc\si\mdm\scene\service\impl\SceneServiceImpl.class]

       - sceneService: defined in file [C:\jw3\si-mdm-fss-center-oop\si-mdm-server-oop\target\classes\com\pcitc\si\mdm\scene\service\SceneService.class]

 

解决方案:

@MapperScan   改为:

@MapperScan(basePackages = {"com.pcitc.*.**.repositories"})

 

Annotation-specified bean, conflicts with existing

Annotation-specified bean name 'logService' for bean class

[com.pcitc.si.common.core.log.LogService] conflicts with existing,

non-compatible bean definition of same name and class [com.pcitc.si.common.log.LogService]

 

解决方案:

@MapperScan   改为:

@MapperScan(basePackages = {"com.pcitc.*.**.repositories"})

posted @ 2022-06-24 10:02  己为  阅读(528)  评论(0编辑  收藏  举报