原文:Failed to parse configuration class xxx; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'feginClientConfig' for .....

最近接到任务,重构公司的支付中心。目前公司有两套基础架构 在框架上在做封装 ,一套比较老,一套比较新。 既然是重构自然而然选择了新的一套。 虽然是重构,但是其他的订单业务还是老的一套,多多少少还是需要和他们对接。 在引用其他老项目的FeignClient。idea 一直提示Could not autowire. No beans of xxxx type found。 因为只是提示我也就没理会, ...

2020-05-27 10:55 0 956 推荐指数:

查看详情

bean名称相同冲突Annotation-specified bean name 'xx' for bean class [xxx] conflicts with existing, non-compatible bean definition of same name and class[xxx]

工程中引入其他工程的包,由于两个工程中有重名的两个bean,导致在启动时提示如下错误: 根据bean名称在ide中查找,找到这两个重名的类,可以看到由于这两个类使用@Service标注,此时如果不使用命名,那么Spring会在扫描时,将类名首字母小写作为key,放到一个全局Map中维护。此时 ...

Fri Oct 11 23:40:00 CST 2019 0 5366
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM