Commit a28cb087 by 罗承锋

关闭所有http代理

parent b0b4850c
...@@ -523,7 +523,7 @@ public class DankuanController { ...@@ -523,7 +523,7 @@ public class DankuanController {
// 新环境正式地址 https://gzctpay.mini189.cn/pay/orderPay/order-pay // 新环境正式地址 https://gzctpay.mini189.cn/pay/orderPay/order-pay
doc = doc =
Jsoup.connect("https://gzctpay.mini189.cn/pay/orderPay/order-pay") Jsoup.connect("https://gzctpay.mini189.cn/pay/orderPay/order-pay")
.proxy("172.18.101.170", 3128) // .proxy("172.18.101.170", 3128)
.data(map) .data(map)
.timeout(20000) .timeout(20000)
.ignoreContentType(true) .ignoreContentType(true)
......
...@@ -417,7 +417,7 @@ public class RongHeController { ...@@ -417,7 +417,7 @@ public class RongHeController {
// 新环境正式地址 https://gzctpay.mini189.cn/pay/orderPay/order-pay // 新环境正式地址 https://gzctpay.mini189.cn/pay/orderPay/order-pay
doc = doc =
Jsoup.connect("https://gzctpay.mini189.cn/pay/orderPay/order-pay") Jsoup.connect("https://gzctpay.mini189.cn/pay/orderPay/order-pay")
.proxy("172.18.101.170", 3128) // .proxy("172.18.101.170", 3128)
.data(map) .data(map)
.timeout(20000) .timeout(20000)
.ignoreContentType(true) .ignoreContentType(true)
......
...@@ -250,13 +250,13 @@ public class IntelligenceSendOrder { ...@@ -250,13 +250,13 @@ public class IntelligenceSendOrder {
private JSONObject getQueryOrderInfo( private JSONObject getQueryOrderInfo(
String orderNum, String currentTimeStr, int count) throws Exception { String orderNum, String currentTimeStr, int count) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(50000) .setSocketTimeout(50000)
.setConnectTimeout(50000) .setConnectTimeout(50000)
.setConnectionRequestTimeout(50000) .setConnectionRequestTimeout(50000)
.setProxy(proxy) // .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
...@@ -344,13 +344,13 @@ public class IntelligenceSendOrder { ...@@ -344,13 +344,13 @@ public class IntelligenceSendOrder {
int count) int count)
throws Exception { throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(50000) .setSocketTimeout(50000)
.setConnectTimeout(50000) .setConnectTimeout(50000)
.setConnectionRequestTimeout(50000) .setConnectionRequestTimeout(50000)
.setProxy(proxy) // .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
...@@ -701,13 +701,13 @@ public class IntelligenceSendOrder { ...@@ -701,13 +701,13 @@ public class IntelligenceSendOrder {
private JSONObject getProductId(String currentTimeStr, int count) throws Exception { private JSONObject getProductId(String currentTimeStr, int count) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
Map<String, String> signMap = new HashMap<String, String>(); // 待签名参数 Map<String, String> signMap = new HashMap<String, String>(); // 待签名参数
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(50000) .setSocketTimeout(50000)
.setConnectTimeout(50000) .setConnectTimeout(50000)
.setConnectionRequestTimeout(50000) .setConnectionRequestTimeout(50000)
.setProxy(proxy) // .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
...@@ -786,13 +786,13 @@ public class IntelligenceSendOrder { ...@@ -786,13 +786,13 @@ public class IntelligenceSendOrder {
throws Exception { throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
Map<String, String> signMap = new HashMap<String, String>(); // 待签名参数 Map<String, String> signMap = new HashMap<String, String>(); // 待签名参数
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(500000) .setSocketTimeout(500000)
.setConnectTimeout(500000) .setConnectTimeout(500000)
.setConnectionRequestTimeout(500000) .setConnectionRequestTimeout(500000)
.setProxy(proxy) // .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
...@@ -1018,13 +1018,13 @@ public class IntelligenceSendOrder { ...@@ -1018,13 +1018,13 @@ public class IntelligenceSendOrder {
} }
} }
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(500000) .setSocketTimeout(500000)
.setConnectTimeout(500000) .setConnectTimeout(500000)
.setConnectionRequestTimeout(500000) .setConnectionRequestTimeout(500000)
.setProxy(proxy) // .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
...@@ -1549,13 +1549,13 @@ public class IntelligenceSendOrder { ...@@ -1549,13 +1549,13 @@ public class IntelligenceSendOrder {
} }
// 3、提交订单到智能平台 // 3、提交订单到智能平台
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(500000) .setSocketTimeout(500000)
.setConnectTimeout(500000) .setConnectTimeout(500000)
.setConnectionRequestTimeout(500000) .setConnectionRequestTimeout(500000)
.setProxy(proxy) // .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
......
...@@ -79,9 +79,11 @@ public class HttpUtil { ...@@ -79,9 +79,11 @@ public class HttpUtil {
} }
request.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8")); request.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8"));
/** 超时时间 5s 重试次数 3 */ /** 超时时间 5s 重试次数 3 */
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000).setSocketTimeout(20000) RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000).setSocketTimeout(20000)
.setProxy(proxy).build(); .build();
// RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000).setSocketTimeout(20000)
// .setProxy(proxy).build();
request.setConfig(requestConfig); request.setConfig(requestConfig);
// 发�?�请�? // 发�?�请�?
log.info(request.getMethod()); log.info(request.getMethod());
......
...@@ -108,8 +108,12 @@ public class HTTPSClient { ...@@ -108,8 +108,12 @@ public class HTTPSClient {
HttpResponse res; HttpResponse res;
try { try {
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(200000).setConnectTimeout(200000).setProxy(proxy).build(); RequestConfig requestConfig = RequestConfig.custom().
setSocketTimeout(200000).
setConnectTimeout(200000)
// .setProxy(proxy)
.build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
CloseableHttpResponse result = httpClient.execute(httpPost); CloseableHttpResponse result = httpClient.execute(httpPost);
...@@ -155,8 +159,12 @@ public class HTTPSClient { ...@@ -155,8 +159,12 @@ public class HTTPSClient {
httpPost.setEntity(s); httpPost.setEntity(s);
HttpResponse res; HttpResponse res;
try { try {
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(200000).setConnectTimeout(200000).setProxy(proxy).build(); RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(200000)
.setConnectTimeout(200000)
// .setProxy(proxy)
.build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
CloseableHttpResponse result = httpClient.execute(httpPost); CloseableHttpResponse result = httpClient.execute(httpPost);
...@@ -327,8 +335,12 @@ public class HTTPSClient { ...@@ -327,8 +335,12 @@ public class HTTPSClient {
CloseableHttpClient httpClient = HttpClients.createDefault(); CloseableHttpClient httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(url); HttpPost httpPost = new HttpPost(url);
try { try {
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(200000).setConnectTimeout(200000).setProxy(proxy).build(); RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(200000)
.setConnectTimeout(200000)
// .setProxy(proxy)
.build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
CloseableHttpResponse result = httpClient.execute(httpPost); CloseableHttpResponse result = httpClient.execute(httpPost);
string = EntityUtils.toString(result.getEntity(), "utf-8"); ; string = EntityUtils.toString(result.getEntity(), "utf-8"); ;
......
...@@ -174,8 +174,12 @@ public class HttpHelper { ...@@ -174,8 +174,12 @@ public class HttpHelper {
HttpPost httpPost = new HttpPost(url); HttpPost httpPost = new HttpPost(url);
try { try {
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(200000).setConnectTimeout(200000).setProxy(proxy).build(); RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(200000).
setConnectTimeout(200000)
// .setProxy(proxy)
.build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
CloseableHttpResponse result = httpClient.execute(httpPost); CloseableHttpResponse result = httpClient.execute(httpPost);
...@@ -214,8 +218,12 @@ public class HttpHelper { ...@@ -214,8 +218,12 @@ public class HttpHelper {
HttpResponse res; HttpResponse res;
try { try {
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(200000).setConnectTimeout(200000).setProxy(proxy).build(); RequestConfig requestConfig = RequestConfig
.custom().setSocketTimeout(200000)
.setConnectTimeout(200000)
// .setProxy(proxy)
.build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
CloseableHttpResponse result = httpClient.execute(httpPost); CloseableHttpResponse result = httpClient.execute(httpPost);
......
...@@ -115,12 +115,6 @@ ...@@ -115,12 +115,6 @@
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<filtering>true</filtering> <filtering>true</filtering>
</resource> </resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources> </resources>
</build> </build>
</project> </project>
\ No newline at end of file
...@@ -1438,9 +1438,11 @@ public class OrderController extends BaseController { ...@@ -1438,9 +1438,11 @@ public class OrderController extends BaseController {
// 保存卡品认证信息 // 保存卡品认证信息
public String sendAitransOrder(Map<String, Object> map, int count) throws NoSuchAlgorithmException, UnsupportedEncodingException { public String sendAitransOrder(Map<String, Object> map, int count) throws NoSuchAlgorithmException, UnsupportedEncodingException {
HttpHost proxy = new HttpHost("172.18.101.170", 3128); // HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(600000).setConnectTimeout(600000) RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(600000).setConnectTimeout(600000)
.setConnectionRequestTimeout(600000).setProxy(proxy).build(); .setConnectionRequestTimeout(600000)
// .setProxy(proxy)
.build();
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment