zuul 熔断后重试

        <dependency>
            <groupId>org.springframework.retrygroupId>
            <artifactId>spring-retryartifactId>
        dependency>

application.yml  开启重试

zuul:
  routes:
    vehicle-admin:
      path: /admin/**
      sensitiveHeaders: Cookie,Set-Cookie
      stripPrefix: false
    vehicle-detect:
      path: /detect/**
      sensitiveHeaders: Cookie,Set-Cookie
      stripPrefix: false
  sensitive-headers : Access-Control-Allow-Origin # 解决zuul跨域拒绝访问问题,忽略部分请求头
  ignored-headers: Access-Control-Allow-Origin,H-APP-Id,Token,APPToke
  host:
    max-per-route-connections: 60000
    socket-timeout-millis: 60000
    connect-timeout-millis: 60000
  retryable: true # 开启重试机制

 

你可能感兴趣的:(zuul 熔断后重试)