mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-07 23:24:39 +08:00
🎨 添加 Apache HttpComponents Client 5.x 为可选的 http client
Some checks failed
Publish to Maven Central / build-and-publish (push) Has been cancelled
Some checks failed
Publish to Maven Central / build-and-publish (push) Has been cancelled
This commit is contained in:
@@ -8,6 +8,7 @@ import com.binarywang.solon.wxjava.channel.service.WxChannelMultiServicesImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.channel.api.WxChannelService;
|
||||
import me.chanjar.weixin.channel.api.impl.WxChannelServiceHttpComponentsImpl;
|
||||
import me.chanjar.weixin.channel.api.impl.WxChannelServiceHttpClientImpl;
|
||||
import me.chanjar.weixin.channel.api.impl.WxChannelServiceImpl;
|
||||
import me.chanjar.weixin.channel.config.WxChannelConfig;
|
||||
@@ -84,6 +85,9 @@ public abstract class AbstractWxChannelConfiguration {
|
||||
case HTTP_CLIENT:
|
||||
wxChannelService = new WxChannelServiceHttpClientImpl();
|
||||
break;
|
||||
case HTTP_COMPONENTS:
|
||||
wxChannelService = new WxChannelServiceHttpComponentsImpl();
|
||||
break;
|
||||
default:
|
||||
wxChannelService = new WxChannelServiceImpl();
|
||||
break;
|
||||
|
@@ -11,6 +11,10 @@ public enum HttpClientType {
|
||||
* HttpClient
|
||||
*/
|
||||
HTTP_CLIENT,
|
||||
/**
|
||||
* HttpComponents
|
||||
*/
|
||||
HTTP_COMPONENTS
|
||||
// WxChannelServiceOkHttpImpl 实现经测试无法正常完成业务固暂不支持OK_HTTP方式
|
||||
// /**
|
||||
// * OkHttp.
|
||||
|
@@ -7,10 +7,7 @@ import com.binarywang.solon.wxjava.cp_multi.service.WxCpMultiServicesImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.cp.api.WxCpService;
|
||||
import me.chanjar.weixin.cp.api.impl.WxCpServiceApacheHttpClientImpl;
|
||||
import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl;
|
||||
import me.chanjar.weixin.cp.api.impl.WxCpServiceJoddHttpImpl;
|
||||
import me.chanjar.weixin.cp.api.impl.WxCpServiceOkHttpImpl;
|
||||
import me.chanjar.weixin.cp.api.impl.*;
|
||||
import me.chanjar.weixin.cp.config.WxCpConfigStorage;
|
||||
import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -96,6 +93,9 @@ public abstract class AbstractWxCpConfiguration {
|
||||
case HTTP_CLIENT:
|
||||
wxCpService = new WxCpServiceApacheHttpClientImpl();
|
||||
break;
|
||||
case HTTP_COMPONENTS:
|
||||
wxCpService = new WxCpServiceHttpComponentsImpl();
|
||||
break;
|
||||
default:
|
||||
wxCpService = new WxCpServiceImpl();
|
||||
break;
|
||||
|
@@ -117,6 +117,10 @@ public class WxCpMultiProperties implements Serializable {
|
||||
* HttpClient
|
||||
*/
|
||||
HTTP_CLIENT,
|
||||
/**
|
||||
* HttpComponents
|
||||
*/
|
||||
HTTP_COMPONENTS,
|
||||
/**
|
||||
* OkHttp
|
||||
*/
|
||||
|
Reference in New Issue
Block a user