From f0e9c546be395d7678a91025729bb2b8cab7bbe7 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Mon, 3 Jul 2017 19:49:30 +0800 Subject: [PATCH] support jodd-http --- pom.xml | 12 +++++++ .../demo/spring/service/WeixinService.java | 31 ++++++------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/pom.xml b/pom.xml index 4dad724..bd7c6e3 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,18 @@ com.github.binarywang weixin-java-mp ${weixin-java-mp.version} + + + org.apache.httpcomponents + * + + + + + + org.jodd + jodd-http + 3.7.1 diff --git a/src/main/java/com/github/binarywang/demo/spring/service/WeixinService.java b/src/main/java/com/github/binarywang/demo/spring/service/WeixinService.java index d3f3353..dc1f94d 100644 --- a/src/main/java/com/github/binarywang/demo/spring/service/WeixinService.java +++ b/src/main/java/com/github/binarywang/demo/spring/service/WeixinService.java @@ -1,32 +1,21 @@ package com.github.binarywang.demo.spring.service; -import javax.annotation.PostConstruct; - -import me.chanjar.weixin.mp.constant.WxMpEventConstants; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - import com.github.binarywang.demo.spring.config.WxMpConfig; -import com.github.binarywang.demo.spring.handler.AbstractHandler; -import com.github.binarywang.demo.spring.handler.KfSessionHandler; -import com.github.binarywang.demo.spring.handler.LocationHandler; -import com.github.binarywang.demo.spring.handler.LogHandler; -import com.github.binarywang.demo.spring.handler.MenuHandler; -import com.github.binarywang.demo.spring.handler.MsgHandler; -import com.github.binarywang.demo.spring.handler.NullHandler; -import com.github.binarywang.demo.spring.handler.StoreCheckNotifyHandler; -import com.github.binarywang.demo.spring.handler.SubscribeHandler; -import com.github.binarywang.demo.spring.handler.UnsubscribeHandler; - +import com.github.binarywang.demo.spring.handler.*; import me.chanjar.weixin.common.api.WxConsts; import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage; import me.chanjar.weixin.mp.api.WxMpMessageRouter; -import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl; +import me.chanjar.weixin.mp.api.impl.WxMpServiceJoddHttpImpl; import me.chanjar.weixin.mp.bean.kefu.result.WxMpKfOnlineList; import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage; import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage; +import me.chanjar.weixin.mp.constant.WxMpEventConstants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.PostConstruct; /** * @@ -34,7 +23,7 @@ * */ @Service -public class WeixinService extends WxMpServiceImpl { +public class WeixinService extends WxMpServiceJoddHttpImpl { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired