{"id":21452160,"url":"https://github.com/binarywang/weixin-java-cp-demo","last_synced_at":"2025-04-04T21:10:14.351Z","repository":{"id":65642945,"uuid":"83952391","full_name":"binarywang/weixin-java-cp-demo","owner":"binarywang","description":"基于Spring Boot 和 WxJava 实现的微信企业号/企业微信 后端Demo","archived":false,"fork":false,"pushed_at":"2024-03-02T09:57:28.000Z","size":3132,"stargazers_count":340,"open_issues_count":9,"forks_count":236,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-04-14T04:20:56.259Z","etag":null,"topics":["spring-boot","wechat","wechat-sdk","weixin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binarywang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-03-05T07:18:12.000Z","updated_at":"2024-03-31T14:19:07.000Z","dependencies_parsed_at":"2024-01-03T04:02:06.825Z","dependency_job_id":"78370ce1-1ca9-49ee-a02f-d9fcf73fa9c0","html_url":"https://github.com/binarywang/weixin-java-cp-demo","commit_stats":{"total_commits":72,"total_committers":4,"mean_commits":18.0,"dds":"0.29166666666666663","last_synced_commit":"517dc7e0cf7ee6262589ab7057e60487f76fb672"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarywang%2Fweixin-java-cp-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarywang%2Fweixin-java-cp-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarywang%2Fweixin-java-cp-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarywang%2Fweixin-java-cp-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binarywang","download_url":"https://codeload.github.com/binarywang/weixin-java-cp-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249532,"owners_count":20908212,"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":["spring-boot","wechat","wechat-sdk","weixin"],"created_at":"2024-11-23T04:28:01.119Z","updated_at":"2025-04-04T21:10:14.300Z","avatar_url":"https://github.com/binarywang.png","language":"Java","readme":"[![码云Gitee](https://gitee.com/binary/weixin-java-cp-demo/badge/star.svg?theme=blue)](https://gitee.com/binary/weixin-java-cp-demo)\n[![Github](http://github-svg-buttons.herokuapp.com/star.svg?user=binarywang\u0026repo=weixin-java-cp-demo\u0026style=flat\u0026background=1081C1)](https://github.com/binarywang/weixin-java-cp-demo)\n[![Build Status](https://travis-ci.com/binarywang/weixin-java-cp-demo.svg?branch=master)](https://travis-ci.com/binarywang/weixin-java-cp-demo)\n-----------------------\n\n### 本项目为 `WxJava` 的 Demo 演示程序，基于 `Spring Boot` 构建，实现企业微信后端开发功能。\n更多信息请查阅：https://github.com/Wechat-Group/WxJava\n\n## 使用步骤：\n1. 请注意，本demo为简化代码编译时加入了 `lombok` 支持，如果不了解 `lombok` 的话，请先学习下相关知识，比如可以阅读[此文章](https://mp.weixin.qq.com/s/cUc-bUcprycADfNepnSwZQ)；\n1. 另外，新手遇到问题，请务必先阅读[【开发文档 Wiki 首页】](https://github.com/Wechat-Group/WxJava/wiki)的常见问题部分，可以少走很多弯路，节省不少时间。\n1. 配置：复制 `/src/main/resources/application.yml.template` 或者修改其扩展名生成 `application.yml` 文件，根据自己需要填写相关配置（需要注意的是：yml文件内的属性冒号后面的文字之前需要加空格，可参考已有配置，否则属性会设置不成功）；\n2. 主要配置说明如下：（ 注意：如果是要配置通讯录同步的应用，`agentId` 可以随便配置一个，保证跟下面服务器URL地址里的一致即可。）\n```\nwechat:\n  cp:\n    corpId: 111 （企业ID 在此页面查看：https://work.weixin.qq.com/wework_admin/frame#profile）\n    appConfigs:\n      - agentId: 1000001 （某一具体应用的AgentId，如果是要配置通讯录同步的应用，可以随便配置一个）\n        secret: 1111（该应用的Secret）\n        token: 111 （应用中的 “接受消息” 部分的 “接收消息服务器配置” 里的Token值）\n        aesKey: 111 （应用中的 “接受消息” 部分的 “接收消息服务器配置” 里的EncodingAESKey值）\n      - agentId: 1000002 （另一个应用，以下同上）\n        secret: 1111\n        token: 111\n        aesKey: 111\n```\n3. 运行Java程序：`WxCpDemoApplication`；\n4. 配置企业微信对应应用中的 `接受消息` 部分的 `接收消息服务器配置` URL地址：`http://{可外网访问的域名}/wx/cp/portal/{xxxxx}` （`xxxx` 要跟 `AgentId` 保持一致，注意 `my-domain` 要跟上面的一致，需要符合微信官方的要求）；\n6. 根据自己需要修改各个 `handler` 的实现，加入自己的业务逻辑。\n\t\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarywang%2Fweixin-java-cp-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarywang%2Fweixin-java-cp-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarywang%2Fweixin-java-cp-demo/lists"}