3.2K Star 18K Fork 5.8K

GVPBinary Wang/WxJava

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

wx-java-mp-spring-boot-starter

快速开始

  1. 引入依赖
    <dependency>
        <groupId>com.github.binarywang</groupId>
        <artifactId>wx-java-mp-spring-boot-starter</artifactId>
        <version>${version}</version>
    </dependency>
    
  2. 添加配置(application.properties)
    # 公众号配置(必填)
    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
  • WxMpConfigStorage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/binary/weixin-java-tools.git
git@gitee.com:binary/weixin-java-tools.git
binary
weixin-java-tools
WxJava
v3.9.0

搜索帮助