mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🎨 #3461【小程序】spring boot starter 和 solon plugin 增加获取稳定版接口调用凭据的参数
This commit is contained in:
parent
8fe1e6ea86
commit
a29e00f00f
@ -15,6 +15,7 @@ public abstract class AbstractWxMaConfigStorageConfiguration {
|
|||||||
config.setToken(StringUtils.trimToNull(properties.getToken()));
|
config.setToken(StringUtils.trimToNull(properties.getToken()));
|
||||||
config.setAesKey(StringUtils.trimToNull(properties.getAesKey()));
|
config.setAesKey(StringUtils.trimToNull(properties.getAesKey()));
|
||||||
config.setMsgDataFormat(StringUtils.trimToNull(properties.getMsgDataFormat()));
|
config.setMsgDataFormat(StringUtils.trimToNull(properties.getMsgDataFormat()));
|
||||||
|
config.useStableAccessToken(properties.isUseStableAccessToken());
|
||||||
|
|
||||||
WxMaProperties.ConfigStorage configStorageProperties = properties.getConfigStorage();
|
WxMaProperties.ConfigStorage configStorageProperties = properties.getConfigStorage();
|
||||||
config.setHttpProxyHost(configStorageProperties.getHttpProxyHost());
|
config.setHttpProxyHost(configStorageProperties.getHttpProxyHost());
|
||||||
|
@ -45,6 +45,11 @@ public class WxMaProperties {
|
|||||||
*/
|
*/
|
||||||
private String msgDataFormat;
|
private String msgDataFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否使用稳定版 Access Token
|
||||||
|
*/
|
||||||
|
private boolean useStableAccessToken = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储策略
|
* 存储策略
|
||||||
*/
|
*/
|
||||||
|
@ -10,12 +10,13 @@
|
|||||||
```
|
```
|
||||||
2. 添加配置(application.properties)
|
2. 添加配置(application.properties)
|
||||||
```properties
|
```properties
|
||||||
# 公众号配置(必填)
|
# 小程序配置(必填)
|
||||||
wx.miniapp.appid = appId
|
wx.miniapp.appid = appId
|
||||||
wx.miniapp.secret = @secret
|
wx.miniapp.secret = @secret
|
||||||
wx.miniapp.token = @token
|
wx.miniapp.token = @token
|
||||||
wx.miniapp.aesKey = @aesKey
|
wx.miniapp.aesKey = @aesKey
|
||||||
wx.miniapp.msgDataFormat = @msgDataFormat # 消息格式,XML或者JSON.
|
wx.miniapp.msgDataFormat = @msgDataFormat # 消息格式,XML或者JSON.
|
||||||
|
wx.miniapp.use-stable-access-token=@useStableAccessToken
|
||||||
# 存储配置redis(可选)
|
# 存储配置redis(可选)
|
||||||
# 注意: 指定redis.host值后不会使用容器注入的redis连接(JedisPool)
|
# 注意: 指定redis.host值后不会使用容器注入的redis连接(JedisPool)
|
||||||
wx.miniapp.config-storage.type = Jedis # 配置类型: Memory(默认), Jedis, RedisTemplate
|
wx.miniapp.config-storage.type = Jedis # 配置类型: Memory(默认), Jedis, RedisTemplate
|
||||||
|
@ -15,6 +15,7 @@ public abstract class AbstractWxMaConfigStorageConfiguration {
|
|||||||
config.setToken(StringUtils.trimToNull(properties.getToken()));
|
config.setToken(StringUtils.trimToNull(properties.getToken()));
|
||||||
config.setAesKey(StringUtils.trimToNull(properties.getAesKey()));
|
config.setAesKey(StringUtils.trimToNull(properties.getAesKey()));
|
||||||
config.setMsgDataFormat(StringUtils.trimToNull(properties.getMsgDataFormat()));
|
config.setMsgDataFormat(StringUtils.trimToNull(properties.getMsgDataFormat()));
|
||||||
|
config.useStableAccessToken(properties.isUseStableAccessToken());
|
||||||
|
|
||||||
WxMaProperties.ConfigStorage configStorageProperties = properties.getConfigStorage();
|
WxMaProperties.ConfigStorage configStorageProperties = properties.getConfigStorage();
|
||||||
config.setHttpProxyHost(configStorageProperties.getHttpProxyHost());
|
config.setHttpProxyHost(configStorageProperties.getHttpProxyHost());
|
||||||
|
@ -44,6 +44,11 @@ public class WxMaProperties {
|
|||||||
*/
|
*/
|
||||||
private String msgDataFormat;
|
private String msgDataFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否使用稳定版 Access Token
|
||||||
|
*/
|
||||||
|
private boolean useStableAccessToken = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储策略
|
* 存储策略
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user