异常问题为controller中存在多个相同的实例
***************************
APPLICATION FAILED TO START
***************************
Description:
Field sysJobService in com.comet.controller.SysJobController required a single bean, but 2 were found:
- sysJobServiceImpl: defined in file [G:\IdeaProject\comet\comet-quartz\target\classes\com\comet\service\impl\SysJobServiceImpl.class]
- ISysJobService: defined in file [G:\IdeaProject\comet\comet-quartz\target\classes\com\comet\service\ISysJobService.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 consumed
我个人在配置映射时没有制定到mapper包中才出现上述问题
改成这样就能成功启动并访问数据库
评论 (0)