前言
项目启动报错The bean 'sys.FeignClientSpecification' could not be registered. A bean with that name has already been defined and overriding is disabled
提示:Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
原因
项目中有两个@FeignClient(value = "sys"),value值都是sys
处理
1 增加配置项
spring.main.allow-bean-definition-overriding=true
增加配置不会启动报错,但是后面的bean会覆盖掉前面的bean,会丢失掉bean信息
2 使用contextId
@FeignClient(value = "sys" ,contextId = "sysUserClient")