org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'attrAttrgroupRelationService' for bean class [com.qhy.gulimall.product.service.AttrAttrgroupRelationService] conflicts with existing, non-compatible bean definition of same name and class [com.qhy.gulimall.product.service.impl.AttrAttrgroupRelationServiceImpl]
报错说是bean的明细重复,但是检查了全局代码,发现并没有重复的bean,经过排查发现@MapperScan注解扫描的范围里有@Service注解导致的bean被重复扫描导致的
解决方法:
1、缩小@MapperScan的扫描范围