🎨 #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

@ -9,8 +9,8 @@ import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.redis.JedisWxRedisOps;
import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps;
import me.chanjar.weixin.common.redis.WxRedisOps;
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.config.impl.WxMpDefaultConfigImpl;
import me.chanjar.weixin.mp.config.impl.WxMpRedisConfigImpl;
import org.apache.commons.lang3.StringUtils;
@ -122,7 +122,7 @@ public class WxMpStorageAutoConfiguration {
config.setSecret(properties.getSecret());
config.setToken(properties.getToken());
config.setAesKey(properties.getAesKey());
config.setUseStableAccessToken(wxMpProperties.isUseStableAccessToken());
config.setHttpProxyHost(configStorageProperties.getHttpProxyHost());
config.setHttpProxyUsername(configStorageProperties.getHttpProxyUsername());
config.setHttpProxyPassword(configStorageProperties.getHttpProxyPassword());

View File

@ -40,6 +40,11 @@ public class WxMpProperties {
* 设置微信公众号的EncodingAESKey.
*/
private String aesKey;
/**
* 是否使用稳定版 Access Token
*/
private boolean useStableAccessToken = false;
/**
* 自定义host配置