weixin java cp demo
1.0.0
WxJava
Demo demonstration program, built based on Spring Boot
, to implement the enterprise WeChat back-end development function.For more information, please check: https://github.com/Wechat-Group/WxJava
lombok
support when compiling to simplify the code. If you don’t know lombok
, please learn the relevant knowledge first. For example, you can read this article;/src/main/resources/application.yml.template
or modify its extension to generate the application.yml
file, fill in the relevant configuration according to your own needs (note: the text after the colon in the yml file needs to be added before Space, you can refer to the existing configuration, otherwise the attribute setting will not be successful);agentId
and make sure it is consistent with the server URL address below.) 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
WxCpDemoApplication
;接收消息服务器配置
URL address of接受消息
receiving part in the corresponding application of Enterprise WeChat: http://{可外网访问的域名}/wx/cp/portal/{xxxxx}
( xxxx
must be consistent with AgentId
, please note my-domain
must be consistent with the above and must meet the official requirements of WeChat);handler
according to your own needs and add your own business logic.