mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-05-08 12:06:07 +08:00
代理设置
This commit is contained in:
@@ -134,11 +134,6 @@ public class HttpRequestTemplate {
|
||||
*/
|
||||
public CredentialsProvider createCredentialsProvider(HttpConfigStorage configStorage){
|
||||
|
||||
if (StringUtils.isNotBlank(configStorage.getHttpProxyHost())) {
|
||||
//http代理地址设置
|
||||
httpProxy = new HttpHost(configStorage.getHttpProxyHost(),configStorage.httpProxyPort);;
|
||||
}
|
||||
|
||||
|
||||
if (StringUtils.isBlank(configStorage.getAuthUsername())) {
|
||||
return null;
|
||||
@@ -185,6 +180,12 @@ public class HttpRequestTemplate {
|
||||
*/
|
||||
public HttpRequestTemplate setHttpConfigStorage(HttpConfigStorage configStorage) {
|
||||
this.configStorage = configStorage;
|
||||
|
||||
if (StringUtils.isNotBlank(configStorage.getHttpProxyHost())) {
|
||||
//http代理地址设置
|
||||
httpProxy = new HttpHost(configStorage.getHttpProxyHost(),configStorage.httpProxyPort);;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user