-
Notifications
You must be signed in to change notification settings - Fork 9
/
spring-cloud.yml
39 lines (39 loc) · 1.31 KB
/
spring-cloud.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## Spring Cloud 配置
spring.cloud:
# 负载均衡
loadbalancer:
enabled: true
retry:
# 该参数用来开启或关闭重试机制,默认是开启
enabled: true
# 对当前实例重试的次数,默认值: 0
max-retries-on-same-service-instance: 0
# 切换实例进行重试的次数,默认值: 1
max-retries-on-next-service-instance: 1
# 对所有操作请求都进行重试(false: 只对 GET 请求重试)
retry-on-all-operations: true
# 对所有异常请求都进行重试(false: 只对 retryable-exceptions 指定的异常进行重试)
retry-on-all-exceptions: true
retryable-exceptions:
# Feign 客户端
openfeign:
client:
config:
default:
# 连接超时时间
connect-timeout: 3000
# 读超时时间
read-timeout: 5000
# 日志级别(可选值:NONE、BASIC、HEADERS、FULL)
logger-level: NONE
compression:
request:
# 开启请求压缩支持
enabled: true
# 压缩支持的 MIME TYPE
mime-types: text/xml,application/xml,text/json,application/json
# 压缩数据大小的下限
min-request-size: 4096
response:
# 开启响应压缩支持
enabled: true