This commit is contained in:
jinyu 2015-08-18 17:43:35 +08:00
parent 61161bb70f
commit 7e054be6fa

View File

@ -140,14 +140,10 @@ public final class WeixinServerBootstrap {
throw new IllegalArgumentException("AesToken not be null");
}
this.aesTokenMap = new HashMap<String, AesToken>();
if (aesTokens.length == 1) {
this.aesTokenMap.put(aesTokens[0].getWeixinId(), aesTokens[0]);
this.aesTokenMap.put(null, aesTokens[0]);
} else {
for (AesToken aesToken : aesTokens) {
this.aesTokenMap.put(aesToken.getWeixinId(), aesToken);
}
}
this.aesTokenMap.put(null, aesTokens[0]);
this.messageHandlerList = new LinkedList<WeixinMessageHandler>();
this.messageInterceptorList = new LinkedList<WeixinMessageInterceptor>();
this.messageDispatcher = new WeixinMessageDispatcher(messageMatcher);