@@ -41,9 +41,9 @@ weixin-java-tools | |||||
## Hello World | ## Hello World | ||||
```java | ```java | ||||
WxConfigStorage config = new WxInMemoryConfigStorage(); | WxConfigStorage config = new WxInMemoryConfigStorage(); | ||||
config.setAppId(...); // 设置微信公众号的appid | |||||
config.setSecret(...); // 设置微信公众号的app corpSecret | |||||
config.setToken(...); // 设置微信公众号的token | |||||
config.setAppId(...); // 设置微信企业号的appid | |||||
config.setSecret(...); // 设置微信企业号的app corpSecret | |||||
config.setToken(...); // 设置微信企业号的token | |||||
WxServiceImpl wxService = new WxServiceImpl(); | WxServiceImpl wxService = new WxServiceImpl(); | ||||
wxService.setWxConfigStorage(config); | wxService.setWxConfigStorage(config); | ||||
@@ -8,7 +8,7 @@ import java.util.List; | |||||
import me.chanjar.weixin.enterprise.util.json.WxCpGsonBuilder; | import me.chanjar.weixin.enterprise.util.json.WxCpGsonBuilder; | ||||
/** | /** | ||||
* 公众号菜单 | |||||
* 企业号菜单 | |||||
* @author Daniel Qian | * @author Daniel Qian | ||||
* | * | ||||
*/ | */ | ||||
@@ -51,7 +51,7 @@ public class WxCryptUtilTest { | |||||
String messageText = String.format(xmlFormat, cipherText); | String messageText = String.format(xmlFormat, cipherText); | ||||
// 第三方收到公众号平台发送的消息 | |||||
// 第三方收到企业号平台发送的消息 | |||||
String plainMessage = pc.decrypt(cipherText); | String plainMessage = pc.decrypt(cipherText); | ||||
System.out.println(plainMessage); | System.out.println(plainMessage); | ||||
@@ -3,7 +3,7 @@ | |||||
<corpSecret>企业号corpsecret</corpSecret> | <corpSecret>企业号corpsecret</corpSecret> | ||||
<agentId>企业号应用id</agentId> | <agentId>企业号应用id</agentId> | ||||
<token>企业号应用Token</token> | <token>企业号应用Token</token> | ||||
<aesKey>公众号应用EncodingAESKey</aesKey> | |||||
<aesKey>企业号应用EncodingAESKey</aesKey> | |||||
<accessToken>可以不填写</accessToken> | <accessToken>可以不填写</accessToken> | ||||
<expiresIn>可以不填写</expiresIn> | <expiresIn>可以不填写</expiresIn> | ||||
<userId>企业号通讯录里的某个userid</userId> | <userId>企业号通讯录里的某个userid</userId> | ||||