🎨 #1516 公众号spring-boot-starter 优化代码,增加http客户端和代理等配置

This commit is contained in:
Mario Luo
2020-04-17 15:45:43 +08:00
committed by GitHub
parent 2112db791d
commit dc01e0b1ed
8 changed files with 269 additions and 125 deletions

View File

@@ -11,18 +11,25 @@
2. 添加配置(application.properties)
```properties
# 公众号配置(必填)
wx.mp.appId = @appId
wx.mp.secret = @secret
wx.mp.token = @token
wx.mp.aesKey = @aesKey
# 存储配置redis(可选)
wx.mp.config-storage.type = redis
wx.mp.config-storage.redis.host = 127.0.0.1
wx.mp.config-storage.redis.port = 6379
wx.mp.appId = appId
wx.mp.secret = @secret
wx.mp.token = @token
wx.mp.aesKey = @aesKey
# 存储配置redis(可选)
wx.mp.config-storage.type = redis # 配置类型: memory(默认), redis, 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
# http客户端配置
wx.mp.config-storage.http-client-type=httpclient # http客户端类型: httpclient(默认), okhttp, joddhttp
wx.mp.config-storage.http-proxy-host=
wx.mp.config-storage.http-proxy-port=
wx.mp.config-storage.http-proxy-username=
wx.mp.config-storage.http-proxy-password=
```
3. 支持自动注入的类型
`WxMpService`以及相关的服务类, 比如: `wxMpService.getXxxService`。
`WxMpService`以及~~相关的服务类, 比如: `wxMpService.getXxxService`。~~