mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-29 16:06:36 +08:00
修复v6 添加隧道类型选择
This commit is contained in:
@@ -135,17 +135,11 @@ public class HttpUtils implements ApplicationContextAware {
|
||||
/**
|
||||
* 创建带超时配置的RestTemplate
|
||||
*/
|
||||
@SneakyThrows
|
||||
private static RestTemplate createRestTemplateWithTimeout() {
|
||||
// 创建基础的RequestFactory
|
||||
org.springframework.http.client.SimpleClientHttpRequestFactory factory =
|
||||
new org.springframework.http.client.SimpleClientHttpRequestFactory();
|
||||
|
||||
// 设置连接超时和读取超时
|
||||
factory.setConnectTimeout(TIMEOUT_MILLISECONDS);
|
||||
factory.setReadTimeout(TIMEOUT_MILLISECONDS);
|
||||
|
||||
// 创建RestTemplate
|
||||
RestTemplate restTemplate = new RestTemplate(factory);
|
||||
RestTemplate restTemplate = new RestTemplate(RestTemplateConfig.generateHttpRequestFactory());
|
||||
restTemplate.setErrorHandler(new NoOpResponseErrorHandler());
|
||||
|
||||
return restTemplate;
|
||||
@@ -203,6 +197,7 @@ public class HttpUtils implements ApplicationContextAware {
|
||||
asyncSaveConfig(url, secret);
|
||||
return body;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
GostDto gostDto = new GostDto();
|
||||
gostDto.setCode(500);
|
||||
gostDto.setMsg("请求失败");
|
||||
|
||||
Reference in New Issue
Block a user