org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.clkj.dataservice.ServiceDataApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'pickDetailServiceImpl' for bean class [com.clkj.landservice.service.impl.PickDetailServiceImpl] conflicts with existing, non-compatible bean definition of same name and class [com.clkj.processservice.service.impl.PickDetailServiceImpl]
情景如下:
1.这是个springcloud项目,我是在一个模块中引入如其他两个模块的,因为需要用到这两个模块的service,但这两个模块中都有一个相同的service的实现类
2.在项目启动的时候,都要像spring容器里注入Bean对象,因为他俩是一个类型的所有会冲突,码友们有啥解决的方案嘛!