1 Star 0 Fork 109

清风飒影 / spring-boot-starter-weixin

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

说明

jfinal weixin 的 spring boot starter,这个starter是为了方便boot用户使用。

具体demo请查看:spring-boot-weixin-demoJFinal-weixin文档

Jar包依赖

<dependency>
    <groupId>net.dreamlu</groupId>
    <artifactId>spring-boot-starter-weixin</artifactId>
    <version>1.1.0</version>
</dependency>

说明:依赖spring-boot-starter-aop

使用

启用微信

@EnableDreamWeixin

消息

公众号

  1. 继承MsgControllerAdapter,实现需要重写的消息。

  2. 添加注解@WxMsgController,注解value为你的消息地址,使用/weixin/wx

小程序

  1. 继承WxaMsgController,实现需要重写的消息。

  2. 添加注解@WxMsgController,注解value为你的消息地址,使用/weixin/wxa

Api

  1. 使用传统的spring的控制器即可

  2. 添加@WxApi注解

配置

配置项 默认值 说明
dream.weixin.access-token-cache dreamWeixinCache 缓存名,需要开启spring cache
dream.weixin.app-id-key appId 多公众号参数名,如:/weixin/wx?appId=xxx
dream.weixin.dev-mode false 开发模式
dream.weixin.url-patterns /weixin/* JFinal-weixin 过滤器url前缀
dream.weixin.wx-configs 公众号的配置 多公众号配置
dream.weixin.wxa-config 小程序配置 小程序配置

注意

  • 可参考demo中的application.yml
  • cache使用spring的cache,需要@EnableCaching开启。
  • access-token-cache建议配置有效时间7100秒。

捐助共勉

VIP群

捐助¥199即可加入如梦技术VIP,捐助后联系QQ: 596392912

VIP权益

  1. spring boot版安全框架(maven + spring boot + spring security + thymeleaf)

  2. 技术资料共享

  3. spring cloud脚手架(改造中)

  4. 更多私有Git资源,

The MIT License (MIT) Copyright (c) 2018 如梦技术 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

jfinal weixin 的 spring boot starter,这个starter是为了方便boot用户使用。 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/caobin/spring-boot-starter-weixin.git
git@gitee.com:caobin/spring-boot-starter-weixin.git
caobin
spring-boot-starter-weixin
spring-boot-starter-weixin
master

搜索帮助