mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-29 09:38:19 +08:00
🎨 wx-java-open-spring-boot-starter 增加重试次数配置
This commit is contained in:
@ -172,6 +172,22 @@ public interface WxMpConfigStorage {
|
||||
*/
|
||||
String getHttpProxyPassword();
|
||||
|
||||
/**
|
||||
* http 请求重试间隔
|
||||
* <pre>
|
||||
* {@link me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl#setRetrySleepMillis(int)}
|
||||
* </pre>
|
||||
*/
|
||||
int getRetrySleepMillis();
|
||||
|
||||
/**
|
||||
* http 请求最大重试次数
|
||||
* <pre>
|
||||
* {@link me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl#setMaxRetryTimes(int)}
|
||||
* </pre>
|
||||
*/
|
||||
int getMaxRetryTimes();
|
||||
|
||||
/**
|
||||
* Gets tmp dir file.
|
||||
*
|
||||
|
||||
@ -4,8 +4,8 @@ import lombok.Data;
|
||||
import me.chanjar.weixin.common.bean.WxAccessToken;
|
||||
import me.chanjar.weixin.common.enums.TicketType;
|
||||
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
||||
import me.chanjar.weixin.mp.config.WxMpHostConfig;
|
||||
import me.chanjar.weixin.mp.config.WxMpConfigStorage;
|
||||
import me.chanjar.weixin.mp.config.WxMpHostConfig;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.io.File;
|
||||
@ -37,6 +37,9 @@ public class WxMpDefaultConfigImpl implements WxMpConfigStorage, Serializable {
|
||||
protected volatile String httpProxyUsername;
|
||||
protected volatile String httpProxyPassword;
|
||||
|
||||
protected volatile int retrySleepMillis = 1000;
|
||||
protected volatile int maxRetryTimes = 5;
|
||||
|
||||
protected volatile String jsapiTicket;
|
||||
protected volatile long jsapiTicketExpiresTime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user