mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-01-23 21:32:09 +08:00
🎨 #3824 【基础架构】升级到 Apache HttpClient 5.x 作为默认 HTTP 客户端
This commit is contained in:
@@ -9,6 +9,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.channel.api.WxChannelService;
|
||||
import me.chanjar.weixin.channel.api.impl.WxChannelServiceHttpClientImpl;
|
||||
import me.chanjar.weixin.channel.api.impl.WxChannelServiceHttpComponentsImpl;
|
||||
import me.chanjar.weixin.channel.api.impl.WxChannelServiceImpl;
|
||||
import me.chanjar.weixin.channel.config.WxChannelConfig;
|
||||
import me.chanjar.weixin.channel.config.impl.WxChannelDefaultConfigImpl;
|
||||
@@ -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;
|
||||
|
||||
@@ -8,7 +8,7 @@ package com.binarywang.spring.starter.wxjava.channel.enums;
|
||||
*/
|
||||
public enum HttpClientType {
|
||||
/**
|
||||
* HttpClient
|
||||
* HttpClient.
|
||||
*/
|
||||
HTTP_CLIENT,
|
||||
// WxChannelServiceOkHttpImpl 实现经测试无法正常完成业务固暂不支持OK_HTTP方式
|
||||
@@ -16,4 +16,8 @@ public enum HttpClientType {
|
||||
// * OkHttp.
|
||||
// */
|
||||
// OK_HTTP,
|
||||
/**
|
||||
* HttpComponents.
|
||||
*/
|
||||
HTTP_COMPONENTS,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user