1 Star 0 Fork 0

赵梓宇 / weixin-java-cp-demo

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

码云Gitee Github Build Status

本项目为 WxJava 的 Demo 演示程序,基于 Spring Boot 构建,实现企业微信后端开发功能。

更多信息请查阅:https://github.com/Wechat-Group/WxJava

使用步骤:

  1. 请注意,本demo为简化代码编译时加入了 lombok 支持,如果不了解 lombok 的话,请先学习下相关知识,比如可以阅读此文章
  2. 另外,新手遇到问题,请务必先阅读【开发文档 Wiki 首页】的常见问题部分,可以少走很多弯路,节省不少时间。
  3. 配置:复制 /src/main/resources/application.yml.template 或者修改其扩展名生成 application.yml 文件,根据自己需要填写相关配置(需要注意的是:yml文件内的属性冒号后面的文字之前需要加空格,可参考已有配置,否则属性会设置不成功);
  4. 主要配置说明如下:( 注意:如果是要配置通讯录同步的应用,agentId 可以随便配置一个,保证跟下面服务器URL地址里的一致即可。)
wechat:
  cp:
    corpId: 111 (企业ID 在此页面查看:https://work.weixin.qq.com/wework_admin/frame#profile)
    appConfigs:
      - agentId: 1000001 (某一具体应用的AgentId,如果是要配置通讯录同步的应用,可以随便配置一个)
        secret: 1111(该应用的Secret)
        token: 111 (应用中的 “接受消息” 部分的 “接收消息服务器配置” 里的Token值)
        aesKey: 111 (应用中的 “接受消息” 部分的 “接收消息服务器配置” 里的EncodingAESKey值)
      - agentId: 1000002 (另一个应用,以下同上)
        secret: 1111
        token: 111
        aesKey: 111
  1. 运行Java程序:WxCpDemoApplication
  2. 配置企业微信对应应用中的 接受消息 部分的 接收消息服务器配置 URL地址:http://{可外网访问的域名}/wx/cp/portal/{xxxxx}xxxx 要跟 AgentId 保持一致,注意 my-domain 要跟上面的一致,需要符合微信官方的要求);
  3. 根据自己需要修改各个 handler 的实现,加入自己的业务逻辑。
MIT License Copyright (c) 2020 赵梓宇 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.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/zhao-ziyu/weixin-java-cp-demo.git
git@gitee.com:zhao-ziyu/weixin-java-cp-demo.git
zhao-ziyu
weixin-java-cp-demo
weixin-java-cp-demo
master

搜索帮助