增加 spring cloud netflix ribbon 入门示例

This commit is contained in:
YunaiV
2020-02-09 17:56:23 +08:00
parent 9ba8574f8a
commit c13e363336

View File

@@ -17,11 +17,11 @@ server:
ribbon:
restclient:
enabled: true # 设置使用 Jersey Client对应 RestClientRibbonConfiguration 配置类
ConnectTimeout: 1 # 请求的连接超时时间,单位:毫秒。默认为 1000
ReadTimeout: 1 # 请求的读取超时时间,单位:毫秒。默认为 1000
user-provider:
demo-provider:
ribbon:
ConnectTimeout: 1000 # 请求的连接超时时间,单位:毫秒。默认为 1000
ReadTimeout: 1 # 请求的读取超时时间,单位:毫秒。默认为 1000
OkToRetryOnAllOperations: true # 是否对所有操作都进行重试,默认为 false。
MaxAutoRetries: 1 # 对当前服务的重试次数,默认为 0 次。
MaxAutoRetriesNextServer: 2 # 重新选择服务的次数,默认为 1 次。注意,不包含第 1 次哈。
MaxAutoRetries: 0 # 对当前服务的重试次数,默认为 0 次。
MaxAutoRetriesNextServer: 1 # 重新选择服务实例的次数,默认为 1 次。注意,不包含第 1 次哈。