mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
.. | ||
src/main | ||
pom.xml | ||
README.md |
wx-java-mp-spring-boot-starter
快速开始
- 引入依赖
<dependency> <groupId>com.github.binarywang</groupId> <artifactId>wx-java-mp-spring-boot-starter</artifactId> <version>${version}</version> </dependency>
- 添加配置(application.properties)
# 公众号配置(必填) wx.mp.appId = appId wx.mp.secret = @secret wx.mp.token = @token wx.mp.aesKey = @aesKey # 存储配置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 # 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=
- 自动注入的类型
WxMpService
以及相关的服务类, 比如:wxMpService.getXxxService
。WxMpConfigStorage