mirror of
https://gitee.com/yudaocode/SpringBoot-Labs.git
synced 2026-09-03 05:53:54 +08:00
增加 spring cloud netflix ribbon 入门示例
This commit is contained in:
@@ -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 次哈。
|
||||
|
||||
Reference in New Issue
Block a user