mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-12-21 19:10:01 +08:00
🎨 #1522 开放平台优化redis存储配置类,同时对应的 spring boot starter 模块增加新特性
This commit is contained in:
@@ -9,26 +9,27 @@
|
||||
</dependency>
|
||||
```
|
||||
2. 添加配置(application.properties)
|
||||
```
|
||||
# 开放平台配置(必填)
|
||||
wx.open.appId = @appId
|
||||
wx.open.secret = @secret
|
||||
wx.open.token = @token
|
||||
wx.open.aesKey = @aesKey
|
||||
# 存储配置redis(可选), 优先使用(wx.open.config-storage.redis)配置的redis, 支持自定注入的JedisPool
|
||||
wx.open.config-storage.type = redis # 可选值, memory(默认), redis
|
||||
wx.open.config-storage.redis.host = 127.0.0.1
|
||||
wx.open.config-storage.redis.port = 6379
|
||||
```properties
|
||||
# 公众号配置(必填)
|
||||
wx.open.appId = appId
|
||||
wx.open.secret = @secret
|
||||
wx.open.token = @token
|
||||
wx.open.aesKey = @aesKey
|
||||
# 存储配置redis(可选)
|
||||
# 优先注入容器的(JedisPool, RedissonClient), 当配置了wx.open.config-storage.redis.host, 不会使用容器注入redis连接配置
|
||||
wx.open.config-storage.type = redis # 配置类型: memory(默认), redis(jedis), jedis, redisson, redistemplate
|
||||
wx.open.config-storage.key-prefix = wx # 相关redis前缀配置: wx(默认)
|
||||
wx.open.config-storage.redis.host = 127.0.0.1
|
||||
wx.open.config-storage.redis.port = 6379
|
||||
# http客户端配置
|
||||
wx.open.config-storage.http-client-type=httpclient # http客户端类型: httpclient(默认)
|
||||
wx.open.config-storage.http-proxy-host=
|
||||
wx.open.config-storage.http-proxy-port=
|
||||
wx.open.config-storage.http-proxy-username=
|
||||
wx.open.config-storage.http-proxy-password=
|
||||
```
|
||||
3. 支持自动注入的类型: `WxOpenService, WxOpenMessageRouter, WxOpenComponentService`
|
||||
|
||||
4. 覆盖自动配置: 自定义注入的bean会覆盖自动注入的
|
||||
- WxOpenConfigStorage
|
||||
- WxOpenService
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user