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))