dev --- 3.8.0.A版本, openProject引用 ; formao-live --- 3.7.0.B 版本, formallProject引用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Daniel Qian a8f5d07ff3 整理及重构 10 年之前
..
src 整理及重构 10 年之前
LICENSE 整理及重构 10 年之前
README.md 整理及重构 10 年之前
pom.xml 整理及重构 10 年之前

README.md

weixin-java-cp

微信企业号Java SDK开发工具集,本项目主要分为两大块:微信消息路由器、微信Java API

详细文档请看 wiki

Quickstart

在你的maven项目中添加:

<dependency>
  <groupId>me.chanjar</groupId>
  <artifactId>weixin-java-cp-tools</artifactId>
  <version>1.0.3</version>
</dependency>

如果要使用*-SNAPSHOT版,则需要在你的pom.xml中添加这段:

<repositories>
  <repository>
      <snapshots />
      <id>sonatype snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
  </repository>
</repositories>

Hello World

WxCpInMemoryConfigStorage config = new WxCpInMemoryConfigStorage();
config.getCorpId(...);      // 设置微信企业号的appid
config.getCorpSecret(...);  // 设置微信企业号的app corpSecret
config.setAgentId(...);     // 设置微信企业号应用ID
config.setToken(...);       // 设置微信企业号应用的token
config.setAesKey(...);      // 设置微信企业号应用的EncodingAESKey

WxCpServiceImpl wxCpService = new WxCpServiceImpl();
wxCpService.setWxCpConfigStorage(config);

String userId = ...; 
WxCpMessage message = WxCpMessage.TEXT().agentId(...).toUser(userId).content("Hello World").build();
wxService.messageSend(message);