小程序
小游戏
企业微信
微信支付
扫描小程序码分享
https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/qrcode-link/qr-code/getUnlimitedQRCode.htmlcreateWxaCodeUnlimit
WxMaQrcodeServiceImpl.createWxaCodeUnlimit java api 调用时,有时会报Read timed out,该api没有设置超时时间的入口,这个问题怎么解决呢?
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
File codeFile = wxMaService.getQrcodeService().createWxaCodeUnlimit(wechatMiniCode.getSceneInfo(), wechatMiniCode.getPage(), false, wechatMiniCode.getEnvVersion(), wechatMiniCode.getWidth(), autoColor, wxMaCodeLineColor, wechatMiniCode.isHyaline());
这个是初始化配置的微信SDK config类,这个类中也没有看到那个字段可以控制超时时间
public class WxMaDefaultConfigImpl implements WxMaConfig {
protected volatile String appid;
protected volatile String token;
/**
* 小程序原始ID
*/
protected volatile String originalId;
protected Lock accessTokenLock = new ReentrantLock();
/**
* 临时文件目录.
*/
protected volatile File tmpDirFile;
private volatile String msgDataFormat;
private volatile String secret;
private volatile String accessToken;
private volatile String aesKey;
private volatile long expiresTime;
/**
* 云环境ID
*/
private volatile String cloudEnv;
private volatile String httpProxyHost;
private volatile int httpProxyPort;
private volatile String httpProxyUsername;
private volatile String httpProxyPassword;
private volatile int retrySleepMillis = 1000;
private volatile int maxRetryTimes = 5;
private volatile String jsapiTicket;
private volatile long jsapiTicketExpiresTime;
/**
* 微信卡券的ticket单独缓存.
*/
private volatile String cardApiTicket;
private volatile long cardApiTicketExpiresTime;
protected volatile Lock jsapiTicketLock = new ReentrantLock();
protected volatile Lock cardApiTicketLock = new ReentrantLock();
private volatile ApacheHttpClientBuilder apacheHttpClientBuilder;
private String apiHostUrl;
private String accessTokenUrl;