|
13 | 13 | 2. 添加配置(application.properties) |
14 | 14 | ```properties |
15 | 15 | # 公众号配置(必填) |
16 | | - wx.mp.appId = appId |
17 | | - wx.mp.secret = @secret |
18 | | - wx.mp.token = @token |
19 | | - wx.mp.aesKey = @aesKey |
| 16 | + wx.qidian.appId = appId |
| 17 | + wx.qidian.secret = @secret |
| 18 | + wx.qidian.token = @token |
| 19 | + wx.qidian.aesKey = @aesKey |
20 | 20 | # 存储配置redis(可选) |
21 | | - wx.mp.config-storage.type = Jedis # 配置类型: Memory(默认), Jedis, RedisTemplate |
22 | | - wx.mp.config-storage.key-prefix = wx # 相关redis前缀配置: wx(默认) |
23 | | - wx.mp.config-storage.redis.host = 127.0.0.1 |
24 | | - wx.mp.config-storage.redis.port = 6379 |
| 21 | + wx.qidian.config-storage.type = Jedis # 配置类型: Memory(默认), Jedis, RedisTemplate |
| 22 | + wx.qidian.config-storage.key-prefix = wx # 相关redis前缀配置: wx(默认) |
| 23 | + wx.qidian.config-storage.redis.host = 127.0.0.1 |
| 24 | + wx.qidian.config-storage.redis.port = 6379 |
25 | 25 | #单机和sentinel同时存在时,优先使用sentinel配置 |
26 | | - #wx.mp.config-storage.redis.sentinel-ips=127.0.0.1:16379,127.0.0.1:26379 |
27 | | - #wx.mp.config-storage.redis.sentinel-name=mymaster |
| 26 | + #wx.qidian.config-storage.redis.sentinel-ips=127.0.0.1:16379,127.0.0.1:26379 |
| 27 | + #wx.qidian.config-storage.redis.sentinel-name=mymaster |
28 | 28 | # http客户端配置 |
29 | | - wx.mp.config-storage.http-client-type=httpclient # http客户端类型: HttpClient(默认), OkHttp, JoddHttp |
30 | | - wx.mp.config-storage.http-proxy-host= |
31 | | - wx.mp.config-storage.http-proxy-port= |
32 | | - wx.mp.config-storage.http-proxy-username= |
33 | | - wx.mp.config-storage.http-proxy-password= |
| 29 | + wx.qidian.config-storage.http-client-type=httpclient # http客户端类型: HttpClient(默认), OkHttp, JoddHttp |
| 30 | + wx.qidian.config-storage.http-proxy-host= |
| 31 | + wx.qidian.config-storage.http-proxy-port= |
| 32 | + wx.qidian.config-storage.http-proxy-username= |
| 33 | + wx.qidian.config-storage.http-proxy-password= |
34 | 34 | # 公众号地址host配置 |
35 | | - #wx.mp.hosts.api-host=http://proxy.com/ |
36 | | - #wx.mp.hosts.open-host=http://proxy.com/ |
37 | | - #wx.mp.hosts.mp-host=http://proxy.com/ |
| 35 | + #wx.qidian.hosts.api-host=http://proxy.com/ |
| 36 | + #wx.qidian.hosts.open-host=http://proxy.com/ |
| 37 | + #wx.qidian.hosts.mp-host=http://proxy.com/ |
38 | 38 | ``` |
39 | 39 | 3. 自动注入的类型 |
40 | 40 |
|
41 | | -- `WxMpService` |
42 | | -- `WxMpConfigStorage` |
| 41 | +- `WxQidianService` |
| 42 | +- `WxQidianConfigStorage` |
43 | 43 |
|
44 | 44 | 4、参考 demo: |
45 | 45 | https://github.com/binarywang/wx-java-mp-demo |
0 commit comments