weixin-java-tools/solon-plugins/wx-java-miniapp-solon-plugin
2025-03-18 12:58:09 +08:00
..
src 🎨 #3461【小程序】spring boot starter 和 solon plugin 增加获取稳定版接口调用凭据的参数 2025-01-03 14:23:20 +08:00
pom.xml 🔖 发布 4.7.3.B 测试版本 2025-03-18 12:58:09 +08:00
README.md 🆕 #3217 增加 solon-plugins 适配 2024-09-02 17:18:56 +08:00

wx-java-miniapp-solon-plugin

快速开始

  1. 引入依赖
    <dependency>
        <groupId>com.github.binarywang</groupId>
        <artifactId>wx-java-miniapp-solon-plugin</artifactId>
        <version>${version}</version>
    </dependency>
    
  2. 添加配置(app.properties)
    # 公众号配置(必填)
    wx.miniapp.appid = appId
    wx.miniapp.secret = @secret
    wx.miniapp.token = @token
    wx.miniapp.aesKey = @aesKey
    wx.miniapp.msgDataFormat = @msgDataFormat                  # 消息格式XML或者JSON.
    # 存储配置redis(可选)
    # 注意: 指定redis.host值后不会使用容器注入的redis连接(JedisPool)
    wx.miniapp.config-storage.type = Jedis                     # 配置类型: Memory(默认), Jedis, RedisTemplate
    wx.miniapp.config-storage.key-prefix = wa                  # 相关redis前缀配置: wa(默认)
    wx.miniapp.config-storage.redis.host = 127.0.0.1
    wx.miniapp.config-storage.redis.port = 6379
    # http客户端配置
    wx.miniapp.config-storage.http-client-type=HttpClient      # http客户端类型: HttpClient(默认), OkHttp, JoddHttp
    wx.miniapp.config-storage.http-proxy-host=
    wx.miniapp.config-storage.http-proxy-port=
    wx.miniapp.config-storage.http-proxy-username=
    wx.miniapp.config-storage.http-proxy-password=
    
  3. 自动注入的类型
  • WxMaService
  • WxMaConfig