<dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId> </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 # 开启重试机制