hystrix 报错'xx.FeignClientSpecification', defined in null, could not be registered.

1、多个接口上的@FeignClient(“相同服务名”)会报错

2、在配置文件中加上


spring:
  main:
    allow-bean-definition-overriding: true

在SpringBoot 2.1之前,这个配置默认就是true,而在2.1做了更改。
设置为true后,因为FeignClientSpecification的原因,FeignClient注解的configuration参数会被覆盖。

posted @ 2020-11-11 11:25  AlexZS  Views(366)  Comments(0)    收藏  举报