请求工具优化

This commit is contained in:
egan
2018-07-05 20:24:43 +08:00
parent a2c83236cf
commit 3791d7c29a

View File

@@ -189,7 +189,7 @@ public class HttpRequestTemplate {
public HttpRequestTemplate setHttpConfigStorage(HttpConfigStorage configStorage) {
this.configStorage = configStorage;
if (StringUtils.isNotBlank(configStorage.getHttpProxyHost())) {
if (null != configStorage && StringUtils.isNotBlank(configStorage.getHttpProxyHost())) {
//http代理地址设置
httpProxy = new HttpHost(configStorage.getHttpProxyHost(),configStorage.httpProxyPort);;
}