public class GlobalRetryProperty extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private boolean |
enable
是否启用全局重试,启用的话,所有HTTP请求都会自动重试。
|
private int |
intervalMs
重试时间间隔
Retry interval
|
private int |
maxRetries
最大重试次数
The maximum number of retries
|
private RetryRule[] |
retryRules
重试规则,默认 响应状态码不是2xx 或者 发生IO异常 时触发重试
Retry rule
|
| 构造器和说明 |
|---|
GlobalRetryProperty() |
private boolean enable
Retry标注的接口才会执行重试。
接口上Retry注解属性优先于全局配置。private int maxRetries
private int intervalMs
private RetryRule[] retryRules
Copyright © 2024. All rights reserved.