{"id":21452162,"url":"https://github.com/binarywang/wxjava","last_synced_at":"2026-01-15T22:19:38.561Z","repository":{"id":37311700,"uuid":"49122742","full_name":"binarywang/WxJava","owner":"binarywang","description":"微信开发 Java SDK ，支持包括微信支付，开放平台，小程序，企业微信，视频号，公众号等的后端开发","archived":false,"fork":false,"pushed_at":"2025-05-12T08:18:45.000Z","size":18021,"stargazers_count":31060,"open_issues_count":55,"forks_count":8845,"subscribers_count":1375,"default_branch":"develop","last_synced_at":"2025-05-12T16:08:21.435Z","etag":null,"topics":["cp","hacktoberfest","java","miniapp","miniprogram","mp","open","sdk","weapp","wechat","wechat-sdk","weixin","weixin-sdk","wxjava","wxpay"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"chanjarster/weixin-java-tools","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binarywang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["binarywang"],"custom":"https://github.com/Wechat-Group/WxJava/blob/master/images/qrcodes/wepay.jpg?raw=true"}},"created_at":"2016-01-06T08:24:05.000Z","updated_at":"2025-05-12T08:57:19.000Z","dependencies_parsed_at":"2024-11-05T16:03:21.447Z","dependency_job_id":"77c8ad00-41e7-4a32-a9c7-ba6882ff78b5","html_url":"https://github.com/binarywang/WxJava","commit_stats":{"total_commits":3308,"total_committers":387,"mean_commits":8.54780361757106,"dds":0.5752720677146312,"last_synced_commit":"6e93062104376870a8c2ebe48f943e98ff1c346a"},"previous_names":["wechat-group/weixin-java-tools","binarywang/wxjava","wechat-group/wxjava"],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarywang%2FWxJava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarywang%2FWxJava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarywang%2FWxJava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarywang%2FWxJava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binarywang","download_url":"https://codeload.github.com/binarywang/WxJava/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253777101,"owners_count":21962629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cp","hacktoberfest","java","miniapp","miniprogram","mp","open","sdk","weapp","wechat","wechat-sdk","weixin","weixin-sdk","wxjava","wxpay"],"created_at":"2024-11-23T04:28:01.486Z","updated_at":"2026-01-11T16:59:42.673Z","avatar_url":"https://github.com/binarywang.png","language":"Java","readme":"## WxJava - 微信开发 Java SDK\n[![Github](https://img.shields.io/github/stars/binarywang/WxJava?logo=github\u0026style=flat\u0026label=Stars)](https://github.com/binarywang/WxJava)\n[![Gitee](https://gitee.com/binary/weixin-java-tools/badge/star.svg?theme=blue)](https://gitee.com/binary/weixin-java-tools)\n[![GitCode](https://gitcode.com/binary/WxJava/star/badge.svg)](https://gitcode.com/binary/WxJava)\n\n[![GitHub release](https://img.shields.io/github/release/binarywang/WxJava?label=Release)](https://github.com/binarywang/WxJava/releases)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.binarywang/wx-java?label=Maven)](https://central.sonatype.com/artifact/com.github.binarywang/wx-java/versions)\n[![Build Status](https://img.shields.io/circleci/project/github/binarywang/WxJava/develop.svg?sanitize=true\u0026label=Build)](https://circleci.com/gh/binarywang/WxJava/tree/develop)\n[![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-支持-blue.svg)](https://www.jetbrains.com/?from=WxJava-weixin-java-tools)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://hellogithub.com/repository/6de6147050c94db4aedfd7098d19f8d8\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://api.hellogithub.com/v1/widgets/recommend.svg?rid=6de6147050c94db4aedfd7098d19f8d8\u0026claim_uid=mwKh0tILBfjlezR\" alt=\"Featured｜HelloGitHub\" width=\"250\" height=\"54\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://trendshift.io/repositories/12152\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://trendshift.io/api/badge/repositories/12152\" alt=\"binarywang%2FWxJava | 趋势转变\" width=\"250\" height=\"55\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n### 微信`Java`开发工具包，支持包括微信支付、开放平台、公众号、企业微信、视频号、小程序等微信功能模块的后端开发。\n\u003cdiv align=\"center\"\u003e\n  \u003cb\u003e特别赞助\u003c/b\u003e\n  \u003ctable cellspacing=\"0\" cellpadding=\"0\" width=\"500\"\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" colspan=\"3\"\u003e\n        \u003ca href=\"http://www.ccflow.org/?from=wxjava\" target=\"_blank\"\u003e\n          \u003cimg height=\"120\" src=\"https://ccfast.cc/AD/ccflow2.png\" alt=\"ccflow\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" colspan=\"2\"\u003e\n        \u003ca href=\"https://www.jeequan.com/product/jeepay.html\" target=\"_blank\"\u003e\n          \u003cimg height=\"120\" src=\"https://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/wxjava_jeepay.png\" alt=\"计全支付Jeepay,开源支付系统\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://www.mall4j.com/cn/?statId=9\" target=\"_blank\"\u003e\n          \u003cimg height=\"120\" src=\"https://img.mall4j.com/mall.png\" alt=\"Mall4j\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ca href=\"http://mp.weixin.qq.com/mp/homepage?__biz=MzI3MzAwMzk4OA==\u0026hid=1\u0026sn=f31af3bf562b116b061c9ab4edf70b61\u0026scene=18#wechat_redirect\" target=\"_blank\"\u003e\n          \u003cimg height=\"120\" src=\"https://gitee.com/binary/weixin-java-tools/raw/develop/images/qrcodes/mp.png\" alt=\"mp qrcode\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://www.diboot.com?from=wxjava\" target=\"_blank\"\u003e\n          \u003cimg height=\"120\" src=\"https://www.diboot.com/img/diboot_ad.png\" alt=\"diboot低代码开发平台\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ca href=\"https://www.crmeb.com/xiazai\" target=\"_blank\"\u003e\n          \u003cimg height=\"120\" src=\"https://crmebjavamer.oss-cn-beijing.aliyuncs.com/crmebimage/gitee/WechatIMG202.jpg\" alt=\"ad\"\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\n### 重要信息\n1. [`WxJava` 荣获 `GitCode` 2024年度十大开源社区奖项](https://mp.weixin.qq.com/s/wM_UlMsDm3IZ1CPPDvcvQw)。\n2. 项目合作洽谈请联系微信`binary0000`（在微信里自行搜索并添加好友，请注明来意，如有关于SDK问题需讨论请参考下文入群讨论，不要加此微信）。\n3. **2026-01-03 发布 [【4.8.0正式版】](https://mp.weixin.qq.com/s/mJoFtGc25pXCn3uZRh6Q-w)**！\n5. 贡献源码可以参考视频：[【贡献源码全过程（上集）】](https://mp.weixin.qq.com/s/3xUZSATWwHR_gZZm207h7Q)、[【贡献源码全过程（下集）】](https://mp.weixin.qq.com/s/nyzJwVVoYSJ4hSbwyvTx9A) ，友情提供：[程序员小山与Bug](https://space.bilibili.com/473631007)\n6. 新手重要提示：本项目仅是一个SDK开发工具包，未提供Web实现，建议使用 `maven` 或 `gradle` 引用本项目即可使用本SDK提供的各种功能，详情可参考 **[【Demo项目】](demo.md)** 或本项目中的部分单元测试代码；\n7. 微信开发新手请务必阅读【开发文档】（[Gitee Wiki](https://gitee.com/binary/weixin-java-tools/wikis/Home) 或者 [Github Wiki](https://github.com/binarywang/WxJava/wiki)）的常见问题部分，可以少走很多弯路，节省不少时间。\n8. 技术交流群：想获得QQ群/微信群/钉钉企业群等信息的同学，请使用微信扫描上面的微信公众号二维码关注 `WxJava` 后点击相关菜单即可获取加入方式，同时也可以在微信中搜索 `weixin-java-tools` 或 `WxJava` 后选择正确的公众号进行关注，该公众号会及时通知SDK相关更新信息，并不定期分享微信Java开发相关技术知识；\n9. 钉钉技术交流群：`32206329`（技术交流2群）, `30294972`（技术交流1群，目前已满），`35724728`（通知群，实时通知Github项目变更记录）。\n10. 微信开发新手或者Java开发新手在群内提问或新开Issue提问前，请先阅读[【提问的智慧】](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md)，并确保已查阅过 [【开发文档Wiki】](https://github.com/binarywang/WxJava/wiki) ，避免浪费大家的宝贵时间；\n11. 寻求帮助时需贴代码或大长串异常信息的，请利用 http://paste.ubuntu.com \n\n--------------------------------\n### 其他说明\n1. **阅读源码的同学请注意，本SDK为简化代码编译时加入了`lombok`支持，如果不了解`lombok`的话，请先学习下相关知识，比如可以阅读[此文章](https://mp.weixin.qq.com/s/cUc-bUcprycADfNepnSwZQ)；**\n2. 如有新功能需求，发现BUG，或者由于微信官方接口调整导致的代码问题，可以直接在[【Issues】](https://github.com/binarywang/WxJava/issues)页提出issue，便于讨论追踪问题；\n3. 如果需要贡献代码，请务必在提交PR之前先仔细阅读[【代码贡献指南】](CONTRIBUTING.md)，谢谢理解配合；\n4. 目前本`SDK`最新版本要求的`JDK`最低版本是`8`，使用`7`的同学可以使用`WxJava` `3.8.0`及以前版本，而还在使用`JDK`6的用户请参考[【此项目】]( https://github.com/binarywang/weixin-java-tools-for-jdk6) ，而其他更早的JDK版本则需要自己改造实现。\n5. [本项目在开源中国的页面](https://www.oschina.net/p/weixin-java-tools-new)，欢迎大家积极留言评分 🙂\n6. SDK开发文档请查阅 [【开发文档Wiki】](https://github.com/binarywang/WxJava/wiki)，部分文档可能未能及时更新，如有发现，可以及时上报或者自行修改。\n7. **如果本开发工具包对您有所帮助，欢迎对我们的努力进行肯定，可以直接前往[【托管于码云的项目首页】](http://gitee.com/binary/weixin-java-tools)，在页尾部分找到“捐助”按钮进行打赏，多多益善 😄。非常感谢各位打赏和捐助的同学！**\n8. 各个模块的Javadoc可以在线查看：[weixin-java-miniapp](http://binary.ac.cn/weixin-java-miniapp-javadoc/)、[weixin-java-pay](http://binary.ac.cn/weixin-java-pay-javadoc/)、[weixin-java-mp](http://binary.ac.cn/weixin-java-mp-javadoc/)、[weixin-java-common](http://binary.ac.cn/weixin-java-common-javadoc/)、[weixin-java-cp](http://binary.ac.cn/weixin-java-cp-javadoc/)、[weixin-java-open](http://binary.ac.cn/weixin-java-open-javadoc/)\n9. 本SDK项目在以下代码托管网站同步更新:\n* 码云：https://gitee.com/binary/weixin-java-tools\n* GitHub：https://github.com/binarywang/WxJava\n\n---------------------------------\n### Maven 引用方式\n注意：最新版本（包括测试版）为 [![Maven Central](https://img.shields.io/maven-central/v/com.github.binarywang/wx-java.svg)](https://central.sonatype.com/artifact/com.github.binarywang/wx-java/versions)，以下为最新正式版。\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.binarywang\u003c/groupId\u003e\n  \u003cartifactId\u003e（不同模块参考下文）\u003c/artifactId\u003e\n  \u003cversion\u003e4.8.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n  - 微信小程序：`weixin-java-miniapp`   \n  - 微信支付：`weixin-java-pay`\n  - 微信开放平台：`weixin-java-open`   \n  - 微信公众号：`weixin-java-mp`    \n  - 企业微信：`weixin-java-cp`\n  - 微信视频号/微信小店：`weixin-java-channel`\n\n**注意**：\n- **移动应用开发**：如果你的移动应用（iOS/Android App）需要接入微信登录、分享等功能：\n  - 微信登录（网页授权）：使用 `weixin-java-open` 模块，在服务端处理 OAuth 授权\n  - 微信支付：使用 `weixin-java-pay` 模块\n  - 客户端集成：需使用微信官方提供的移动端SDK（iOS/Android），本项目为服务端SDK\n- **微信开放平台**（`weixin-java-open`）主要用于第三方平台，代公众号或小程序进行开发和管理\n\n\n---------------------------------\n### HTTP 客户端支持\n\n本项目同时支持多种 HTTP 客户端实现，默认推荐使用 **Apache HttpClient 5.x**（最新稳定版本）。\n\n#### 支持的 HTTP 客户端类型\n\n| HTTP 客户端 | 说明 | 配置值 | 推荐程度 |\n|------------|------|--------|---------|\n| Apache HttpClient 5.x | Apache HttpComponents Client 5.x，最新版本 | `HttpComponents` | ⭐⭐⭐⭐⭐ 推荐 |\n| Apache HttpClient 4.x | Apache HttpClient 4.x，向后兼容 | `HttpClient` | ⭐⭐⭐⭐ 兼容 |\n| OkHttp | Square OkHttp 客户端 | `OkHttp` | ⭐⭐⭐ 可选 |\n| Jodd-http | Jodd 轻量级 HTTP 客户端 | `JoddHttp` | ⭐⭐ 可选 |\n\n#### 配置方式\n\n**Spring Boot 配置示例：**\n\n```properties\n# 使用 HttpClient 5.x（推荐，MP/MiniApp/CP/Channel/QiDian 模块默认）\nwx.mp.config-storage.http-client-type=HttpComponents\n\n# 使用 HttpClient 4.x（兼容模式）\nwx.mp.config-storage.http-client-type=HttpClient\n\n# 使用 OkHttp\nwx.mp.config-storage.http-client-type=OkHttp\n\n# 使用 Jodd-http\nwx.mp.config-storage.http-client-type=JoddHttp\n```\n\n**注意**：如果使用 Multi-Starter（如 `wx-java-mp-multi-spring-boot-starter`），枚举值需使用大写下划线格式：\n```properties\n# Multi-Starter 配置格式\nwx.mp.config-storage.http-client-type=HTTP_COMPONENTS  # 注意使用大写下划线\n```\n\n**注意事项：**\n1. **MP、MiniApp、Channel、QiDian 模块**已完整支持 HttpClient 5.x，默认推荐使用\n2. **CP 模块**的支持情况取决于具体使用的 Starter 版本，请参考对应模块文档\n3. 如需使用 OkHttp 或 Jodd-http，需在项目中添加对应的依赖（scope为provided）\n4. HttpClient 4.x 和 HttpClient 5.x 可以共存，按需配置即可\n\n\n---------------------------------\n### 版本说明\n\n\u003cdetails\u003e\n\u003csummary\u003e点此展开查看\u003c/summary\u003e\n  \n1. 本项目定为大约每半年左右发布一次正式版，遇到重大问题需修复会及时提交新版本，欢迎大家随时提交 `Pull Request`；\n2. 每次代码更新都会自动构建出新版本方便及时尝鲜，版本号格式为 `x.x.x-时间戳`;\n3. 发布正式版时，`develop` 分支代码合并进入 `release` 分支），版本号格式为 `X.X.0`（如`2.1.0`，`2.2.0`等）；\n4. 每隔一段时间后，会发布测试版本（如`3.6.8.B`，即尾号不为0，并添加B，以区别于正式版），代码仅存在于 `develop` 分支中；\n5. 目前最新版本号为 [![Maven Central](https://img.shields.io/maven-central/v/com.github.binarywang/wx-java.svg)](http://mvnrepository.com/artifact/com.github.binarywang/wx-java) ，也可以通过访问以下链接分别查看各个模块最新的版本： \n[【微信支付】](https://central.sonatype.com/artifact/com.github.binarywang/weixin-java-pay/versions) 、[【小程序】](https://central.sonatype.com/artifact/com.github.binarywang/weixin-java-miniapp/versions) 、[【公众号】](https://central.sonatype.com/artifact/com.github.binarywang/weixin-java-mp/versions) 、[【企业微信】](https://central.sonatype.com/artifact/com.github.binarywang/weixin-java-cp/versions)、[【开放平台】](https://central.sonatype.com/artifact/com.github.binarywang/weixin-java-open/versions)、[【视频号】](https://central.sonatype.com/artifact/com.github.binarywang/weixin-java-channel/versions)\n\n\n\u003c/details\u003e\n\n----------------------------------\n### 应用案例\n完整案例登记列表，请[【访问这里】](https://github.com/binarywang/WxJava/issues/729)查看，欢迎登记更多的案例。\n\n\u003cdetails\u003e\n\u003csummary\u003e以下为节选的部分案例， 点此展开查看\u003c/summary\u003e\n\n#### 开源项目：\n- 基于微信公众号的签到、抽奖、发送弹幕程序：https://github.com/workcheng/weiya\n- Jeepay 支付系统：https://gitee.com/jeequan/jeepay\n- 微同商城：https://gitee.com/fuyang_lipengjun/platform\n- 微信点餐系统：https://github.com/sqmax/springboot-project\n- 专注批量推送的小而美的工具：https://github.com/rememberber/WePush\n- yshop意象商城系统：https://gitee.com/guchengwuyue/yshopmall\n- wx-manage（微信公众号管理项目）：https://github.com/niefy/wx-manage\n- 基于若依开发的微信公众号管理系统：https://gitee.com/joolun/JooLun-wx\n- SAAS微信小程序电商：https://gitee.com/wei-it/weiit-saas\n- mall4j 电商商城系统：https://gitee.com/gz-yami/mall4j\n\n#### 小程序：\n- （京东）友家铺子，友家铺子店长版，京粉精选\n- [喵星人贴吧助手(扫码关注)](http://p98ahz3tg.bkt.clouddn.com/miniappqrcode.jpg)\n- 树懒揽书+\n- 广廉快线，鹏城巴士等\n- 当燃挑战、sportlight轻灵运动\n- 360考试宝典\n- 民医台\n- 来一团商家版\n- 史必达（史丹利）\n- 嘀嗒云印\n- 维沃吼吼\n- 王朝社区（比亚迪新能源社区）\n- 极吼吼手机上门回收换新\n- 未来信封 \n- 5G惠享\n- 生菜wordpress转小程序\n- 丽日购\n\n#### 公众号：\n- 中国电信上海网厅（sh_189）\n- E答平台\n- 宁夏生鲜365\n- 通服货滴\n- 神龙养车\n- 沃音乐商务智能\n- 光环云社群\n- 手机排队\n- [全民约跑健身便利店](http://www.oneminsport.com/)\n- 民医台\n- YshopMall\n- 好行景区直通车以及全国40多个公众号\n- 我奥篮球公众号\n- 未来信封官微\n- 银川智云问诊\n- 5G惠享\n\n#### 企业微信：\n- HTC企业微信\n- 掌上史丹利\n- 药店益\n\n#### 其他：\n- 高善人力资源\n- 小猪餐餐\n- 餐饮系统\n- 微信公众号管理系统：http://demo.joolun.com\n- 锐捷网络：Saleslink\n\n\u003c/details\u003e\n\n----------------------------------\n### 贡献者列表\n特别感谢参与贡献的所有同学，所有贡献者列表请在[此处](https://github.com/binarywang/WxJava/graphs/contributors)查看，欢迎大家继续踊跃贡献代码！\n\n\u003ca href=\"https://github.com/binarywang/WxJava/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=binarywang/WxJava\" /\u003e\n\u003c/a\u003e\n\n### GitHub Stargazers over time\n[![Star History Chart](https://api.star-history.com/svg?repos=binarywang/WxJava\u0026type=Date)](https://star-history.com/#binarywang/WxJava\u0026Date)\n","funding_links":["https://github.com/sponsors/binarywang","https://github.com/Wechat-Group/WxJava/blob/master/images/qrcodes/wepay.jpg?raw=true"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarywang%2Fwxjava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarywang%2Fwxjava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarywang%2Fwxjava/lists"}