🎨 #3834 【基础架构】小程序和开放平台两个模块补充了 Apache HttpClient 5.x 实现,同时并将多个模块的默认服务实现迁移至 Apache HttpClient 5.x 客户端
This commit is contained in:
@@ -8,6 +8,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.mp.api.WxMpService;
|
||||
import me.chanjar.weixin.mp.api.impl.WxMpServiceHttpClientImpl;
|
||||
import me.chanjar.weixin.mp.api.impl.WxMpServiceHttpComponentsImpl;
|
||||
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
|
||||
import me.chanjar.weixin.mp.api.impl.WxMpServiceJoddHttpImpl;
|
||||
import me.chanjar.weixin.mp.api.impl.WxMpServiceOkHttpImpl;
|
||||
@@ -91,6 +92,9 @@ public abstract class AbstractWxMpConfiguration {
|
||||
case HTTP_CLIENT:
|
||||
wxMpService = new WxMpServiceHttpClientImpl();
|
||||
break;
|
||||
case HTTP_COMPONENTS:
|
||||
wxMpService = new WxMpServiceHttpComponentsImpl();
|
||||
break;
|
||||
default:
|
||||
wxMpService = new WxMpServiceImpl();
|
||||
break;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class WxMpMultiProperties implements Serializable {
|
||||
/**
|
||||
* http客户端类型.
|
||||
*/
|
||||
private HttpClientType httpClientType = HttpClientType.HTTP_CLIENT;
|
||||
private HttpClientType httpClientType = HttpClientType.HTTP_COMPONENTS;
|
||||
|
||||
/**
|
||||
* http代理主机.
|
||||
@@ -149,6 +149,10 @@ public class WxMpMultiProperties implements Serializable {
|
||||
/**
|
||||
* JoddHttp
|
||||
*/
|
||||
JODD_HTTP
|
||||
JODD_HTTP,
|
||||
/**
|
||||
* HttpComponents
|
||||
*/
|
||||
HTTP_COMPONENTS
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user