🎨 #3261【公众号】增加是否启用 StableAccessToken的配置

This commit is contained in:
foreveryang321
2024-05-09 00:24:59 +08:00
committed by GitHub
parent 976b2b5a17
commit 767fdd5289
6 changed files with 28 additions and 15 deletions

View File

@@ -115,6 +115,7 @@ public abstract class AbstractWxMpConfiguration {
String appSecret = corpProperties.getAppSecret();
String token = corpProperties.getToken();
String aesKey = corpProperties.getAesKey();
boolean useStableAccessToken = corpProperties.isUseStableAccessToken();
config.setAppId(appId);
config.setSecret(appSecret);
@@ -124,6 +125,7 @@ public abstract class AbstractWxMpConfiguration {
if (StringUtils.isNotBlank(aesKey)) {
config.setAesKey(aesKey);
}
config.setUseStableAccessToken(useStableAccessToken);
}
private void configHttp(WxMpDefaultConfigImpl config, WxMpMultiProperties.ConfigStorage storage) {

View File

@@ -32,4 +32,9 @@ public class WxMpSingleProperties implements Serializable {
* 设置微信公众号的 EncodingAESKey.
*/
private String aesKey;
/**
* 是否使用稳定版 Access Token
*/
private boolean useStableAccessToken = false;
}