SpringCloud --- Feign 单独为某个接口提供超时配置

配置

  1. 将原先的接口提取出来,单独写一份
    @FeignClient(value = “etc-exchange”, contextId = “etc-exchange-2”, fallback = PsamRemoteServiceFallback2.class)
    重新声明一个 contextId

  2. 添加配置项

1
2
3
4
5
6
feign:
client:
config:
etc-exchange-2:
connect-timeout: 3000
read-timeout: 3000