The bean 'cyb-weixin.FeignClientSpecification' could not be registered. A bean with that name has already been defined and overriding is disabled.

该错误原因是springboot2.0以后,默认不允许同一个服务中接口中存在多个feign实体bean,即@FeignClient(“相同服务名”)会报错

解决办法:在bootstrap.yml文件中添加如下配置,注意该配置不能配置到配置中心

spring.main.allow-bean-definition-overriding=true

 

posted @ 2020-03-27 15:11  陈远波  阅读(2848)  评论(0编辑  收藏  举报