mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-29 01:18:36 +08:00
🎨 #3261【公众号】增加是否启用 StableAccessToken的配置
This commit is contained in:
@ -19,12 +19,14 @@
|
||||
## 选填
|
||||
wx.mp.tenantId1.token=@token
|
||||
wx.mp.tenantId1.aes-key=@aesKey
|
||||
wx.mp.tenantId1.use-stable-access-token=@useStableAccessToken
|
||||
## 应用 2 配置(必填)
|
||||
wx.mp.tenantId2.app-id=@appId
|
||||
wx.mp.tenantId2.app-secret =@secret
|
||||
## 选填
|
||||
wx.mp.tenantId2.token=@token
|
||||
wx.mp.tenantId2.aes-key=@aesKey
|
||||
wx.mp.tenantId2.use-stable-access-token=@useStableAccessToken
|
||||
|
||||
# ConfigStorage 配置(选填)
|
||||
## 配置类型: memory(默认), jedis, redisson, redis_template
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -32,4 +32,9 @@ public class WxMpSingleProperties implements Serializable {
|
||||
* 设置微信公众号的 EncodingAESKey.
|
||||
*/
|
||||
private String aesKey;
|
||||
|
||||
/**
|
||||
* 是否使用稳定版 Access Token
|
||||
*/
|
||||
private boolean useStableAccessToken = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user