From 163dc71969315042ebdca6de4659942e97e47413 Mon Sep 17 00:00:00 2001 From: egan Date: Sun, 21 Jan 2018 13:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/egzosn/pay/common/http/HttpRequestTemplate.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pay-java-common/src/main/java/com/egzosn/pay/common/http/HttpRequestTemplate.java b/pay-java-common/src/main/java/com/egzosn/pay/common/http/HttpRequestTemplate.java index 4c0fa1f7..c925e800 100644 --- a/pay-java-common/src/main/java/com/egzosn/pay/common/http/HttpRequestTemplate.java +++ b/pay-java-common/src/main/java/com/egzosn/pay/common/http/HttpRequestTemplate.java @@ -108,7 +108,7 @@ public CredentialsProvider createProxy(HttpConfigStorage configStorage){ //http代理地址设置 httpProxy = new HttpHost(configStorage.getHttpProxyHost(), configStorage.getHttpProxyPort()); - if (StringUtils.isNotBlank(configStorage.getHttpProxyHost())) { + if (StringUtils.isBlank(configStorage.getHttpProxyUsername())) { return null; } @@ -137,7 +137,7 @@ public HttpRequestTemplate setHttpConfigStorage(HttpConfigStorage configStorage) httpClient = HttpClients .custom() - //设置代理 + //设置代理或网络提供者 .setDefaultCredentialsProvider(createProxy(configStorage)) //设置httpclient的SSLSocketFactory .setSSLSocketFactory(createSSL(configStorage))