upgrade version to 1.6.6 & 1.1.5
This commit is contained in:
@@ -114,4 +114,20 @@
|
||||
|
||||
* 2015-12-21
|
||||
|
||||
+ WeixinMessageHanlder中新增weight接口
|
||||
+ WeixinMessageHanlder中新增weight接口
|
||||
|
||||
* 2015-12-25
|
||||
|
||||
+ DigestUtil 重命名为 DigestUtils
|
||||
|
||||
* 2015-12-26
|
||||
|
||||
+ WeixinMessageInterceptor加入weight权重接口
|
||||
|
||||
+ 移入weixin4j下模块化
|
||||
|
||||
+ 删除无用的工具类并重新整理
|
||||
|
||||
* 2015-12-31
|
||||
|
||||
+ version upgrade to 1.1.5
|
||||
@@ -15,12 +15,12 @@ base on netty.
|
||||
|
||||
如何使用
|
||||
-------
|
||||
###maven依赖(1.1.4,2015-12-10 released)
|
||||
###maven依赖(1.1.5,2015-12-31 released)
|
||||
|
||||
<dependency>
|
||||
<groupId>com.foxinmy</groupId>
|
||||
<artifactId>weixin4j-server</artifactId>
|
||||
<version>1.1.4</version>
|
||||
<version>1.1.5</version>
|
||||
</dependency>
|
||||
###编写服务启动类
|
||||
明文模式并总是调试输出微信请求信息的服务启动类.
|
||||
|
||||
+9
-4
@@ -86,7 +86,7 @@ public class WeixinMessageDispatcher {
|
||||
/**
|
||||
* 消息转换
|
||||
*/
|
||||
private Map<Class<? extends WeixinMessage>, Unmarshaller> messageUnmarshaller;
|
||||
private ThreadLocal<Map<Class<? extends WeixinMessage>, Unmarshaller>> messageUnmarshaller;
|
||||
/**
|
||||
* 是否总是响应请求,如未匹配到MessageHandler时回复空白消息
|
||||
*/
|
||||
@@ -98,7 +98,12 @@ public class WeixinMessageDispatcher {
|
||||
|
||||
public WeixinMessageDispatcher(WeixinMessageMatcher messageMatcher) {
|
||||
this.messageMatcher = messageMatcher;
|
||||
this.messageUnmarshaller = new HashMap<Class<? extends WeixinMessage>, Unmarshaller>();
|
||||
this.messageUnmarshaller = new ThreadLocal<Map<Class<? extends WeixinMessage>, Unmarshaller>>() {
|
||||
@Override
|
||||
protected Map<Class<? extends WeixinMessage>, Unmarshaller> initialValue() {
|
||||
return new HashMap<Class<? extends WeixinMessage>, Unmarshaller>();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -373,12 +378,12 @@ public class WeixinMessageDispatcher {
|
||||
*/
|
||||
protected Unmarshaller getUnmarshaller(Class<? extends WeixinMessage> clazz)
|
||||
throws WeixinException {
|
||||
Unmarshaller unmarshaller = messageUnmarshaller.get(clazz);
|
||||
Unmarshaller unmarshaller = messageUnmarshaller.get().get(clazz);
|
||||
if (unmarshaller == null) {
|
||||
try {
|
||||
JAXBContext jaxbContext = JAXBContext.newInstance(clazz);
|
||||
unmarshaller = jaxbContext.createUnmarshaller();
|
||||
messageUnmarshaller.put(clazz, unmarshaller);
|
||||
messageUnmarshaller.get().put(clazz, unmarshaller);
|
||||
} catch (JAXBException e) {
|
||||
throw new WeixinException(e);
|
||||
}
|
||||
|
||||
+1
-1
@@ -315,5 +315,5 @@ public final class WeixinServerBootstrap {
|
||||
return this;
|
||||
}
|
||||
|
||||
public final static String VERSION = "1.1.4";
|
||||
public final static String VERSION = "1.1.5";
|
||||
}
|
||||
Reference in New Issue
Block a user