From cec266d3cd27e79e61b7e614d0c85e0b43492115 Mon Sep 17 00:00:00 2001 From: dsk <2514169858@qq.com> Date: Sun, 25 Jun 2023 16:00:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=8A=A5=E9=94=99404=E7=AD=89=E6=83=85=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E5=AF=BC=E8=87=B4ResponseBody=E6=9C=AA=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java index a350469d..222fbd46 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java @@ -192,10 +192,10 @@ public class ZLMRESTfulUtils { } else { logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message())); } - Objects.requireNonNull(response.body()).close(); } else { logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message())); } + Objects.requireNonNull(response.body()).close(); } catch (ConnectException e) { logger.error(String.format("连接ZLM失败: %s, %s", e.getCause().getMessage(), e.getMessage())); logger.info("请检查media配置并确认ZLM已启动..."); From 7749ea3421f6cc48a59db04bc9babfb8a404d740 Mon Sep 17 00:00:00 2001 From: dsk <2514169858@qq.com> Date: Sun, 25 Jun 2023 16:16:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4=E9=85=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=82=B9=E6=92=AD=E8=B6=85=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E6=8A=A5=E9=94=99org.springframewor?= =?UTF-8?q?k.web.context.request.async.AsyncRequestTimeoutException?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/all-application.yml | 4 ++++ src/main/resources/application-dev.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/main/resources/all-application.yml b/src/main/resources/all-application.yml index 0b079f10..ef247f7f 100644 --- a/src/main/resources/all-application.yml +++ b/src/main/resources/all-application.yml @@ -5,6 +5,10 @@ spring: + # 设置接口超时时间 + mvc: + async: + request-timeout: 20000 # [可选]上传文件大小限制 servlet: multipart: diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index f5404e26..504c9c66 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,4 +1,8 @@ spring: + # 设置接口超时时间 + mvc: + async: + request-timeout: 20000 thymeleaf: cache: false # [可选]上传文件大小限制