mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-12-21 19:10:01 +08:00
🎨 #3261【公众号】增加是否启用 StableAccessToken的配置
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# wx-java-mp-spring-boot-starter
|
||||
|
||||
## 快速开始
|
||||
|
||||
1. 引入依赖
|
||||
```xml
|
||||
<dependency>
|
||||
@@ -11,15 +13,16 @@
|
||||
2. 添加配置(application.properties)
|
||||
```properties
|
||||
# 公众号配置(必填)
|
||||
wx.mp.appId = appId
|
||||
wx.mp.secret = @secret
|
||||
wx.mp.token = @token
|
||||
wx.mp.aesKey = @aesKey
|
||||
wx.mp.app-id=appId
|
||||
wx.mp.secret=@secret
|
||||
wx.mp.token=@token
|
||||
wx.mp.aes-key=@aesKey
|
||||
wx.mp.use-stable-access-token=@useStableAccessToken
|
||||
# 存储配置redis(可选)
|
||||
wx.mp.config-storage.type = Jedis # 配置类型: Memory(默认), Jedis, RedisTemplate
|
||||
wx.mp.config-storage.key-prefix = wx # 相关redis前缀配置: wx(默认)
|
||||
wx.mp.config-storage.redis.host = 127.0.0.1
|
||||
wx.mp.config-storage.redis.port = 6379
|
||||
wx.mp.config-storage.type= edis # 配置类型: Memory(默认), Jedis, RedisTemplate
|
||||
wx.mp.config-storage.key-prefix=wx # 相关redis前缀配置: wx(默认)
|
||||
wx.mp.config-storage.redis.host=127.0.0.1
|
||||
wx.mp.config-storage.redis.port=6379
|
||||
#单机和sentinel同时存在时,优先使用sentinel配置
|
||||
#wx.mp.config-storage.redis.sentinel-ips=127.0.0.1:16379,127.0.0.1:26379
|
||||
#wx.mp.config-storage.redis.sentinel-name=mymaster
|
||||
@@ -35,13 +38,9 @@
|
||||
#wx.mp.hosts.mp-host=http://proxy.com/
|
||||
```
|
||||
3. 自动注入的类型
|
||||
|
||||
- `WxMpService`
|
||||
- `WxMpConfigStorage`
|
||||
|
||||
4、参考demo:
|
||||
https://github.com/binarywang/wx-java-mp-demo
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user