项目启动报错:
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'actExtGroupController': Unsatisfied dependency expressed through field 'service'; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type '?' available: expected single matching bean but found 63: sysMessageServiceImpl,sysMessageTemplateServiceImpl,ossFileService,quartzJobServiceImpl,cusParamConfigServiceImpl,sysAnnouncementSendServiceImpl,sysAnnouncementServiceImpl,sysAttachmentServiceImpl,sysCategoryServiceImpl,sysCheckRuleServiceImpl,sysDataLogServiceImpl,sysDataSourceServiceImpl,sysDataTypeServiceImpl,sysDepartPermissionServiceImpl,sysDepartRolePermissionServiceImpl,sysDepartRoleServiceImpl,sysDepartRoleUserServiceImpl,sysDepartServiceImpl,sysDictItemServiceImpl,sysDictServiceImpl,sysFillRuleServiceImpl,sysGatewayRouteServiceImpl,sysLogServiceImpl,sysPermissionDataRuleImpl,sysPermissionServiceImpl,sysPositionServiceImpl,sysRolePermissionServiceImpl,sysRoleServiceImpl,sysTenantServiceImpl,sysUserAgentServiceImpl,sysUserDepartServiceImpl,sysUserFgbmServiceImpl,sysUserPermissionServiceImpl,sysUserRoleServiceImpl,sysUserServiceImpl,onlCgreportParamServiceImpl,onlAuthDataServiceImpl,onlCgformButtonServiceImpl,onlAuthPageServiceImpl,onlCgformFieldServiceImpl,onlCgreportHeadServiceImpl,onlAuthRelationServiceImpl,onlCgformHeadServiceImpl,onlCgreportItemServiceImpl,onlCgformIndexServiceImpl,businessPsyServiceImpl,businessYjhfServiceImpl,dfEmailInboxServiceImpl,dfEmailServiceImpl,dfEmailTrashServiceImpl,dfNoticesRecipientsServiceImpl,dfNoticesServiceImpl,processFormServiceImpl,TCodeTradeServiceImpl,TComnXzqhdmServiceImpl,actHiCommentServiceImpl,actExtGroupService,actExtMembershipService,actExtProcConfigService,actExtProcflowelService,actProcessDefinitionService,actProcessInstanceService,actTaskService
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
从百度查说,是有相同名字的Bean注入,找了半天也没找到,
最后发现需要加一个注解 @Primary
根据报错信息 指向 actExtGroupController 所以加在 actExtGroup的实现类impl上就完美解决了