mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-06-01 21:40:26 +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;
|
||||
}
|
||||
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -121,7 +121,7 @@
|
||||
<encoding>utf-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- <plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.3</version>
|
||||
@@ -181,7 +181,7 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugin>-->
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
Reference in New Issue
Block a user