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 2378d529..054e5fcc 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已启动..."); 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 # [可选]上传文件大小限制