From 432041ec4f81185f4da8a5d94c4bcfbfe5891c34 Mon Sep 17 00:00:00 2001 From: yiming Date: Wed, 30 Mar 2022 14:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E9=94=AE=E7=94=9F=E6=88=90=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zhehekeji/web/controller/CameraController.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web/src/main/java/com/zhehekeji/web/controller/CameraController.java b/web/src/main/java/com/zhehekeji/web/controller/CameraController.java index 1e5a293..50b94cf 100644 --- a/web/src/main/java/com/zhehekeji/web/controller/CameraController.java +++ b/web/src/main/java/com/zhehekeji/web/controller/CameraController.java @@ -15,6 +15,7 @@ import com.zhehekeji.web.pojo.street.StreetSearch; import com.zhehekeji.web.service.CameraService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -25,6 +26,7 @@ import java.util.List; @Api(value = "camera",tags = "球机管理") @RestController @RequestMapping("/camera") +@Slf4j public class CameraController { @Resource @@ -125,9 +127,13 @@ public class CameraController { } @GetMapping("/downloadConfig") - @ApiOperation(value = "下载") + @ApiOperation(value = "视频直播配置") public Result downloadConfig() throws IOException { - File file = new File("./config.json"); + File directory = new File("D:\\hzleaper_auto_install/rtsp2webRTC"); + if(!directory.exists()){ + directory.mkdirs(); + } + File file = new File("D:\\hzleaper_auto_install/rtsp2webRTC/config.json"); if (file.exists()) { // 如果已存在,删除旧文件 file.delete(); } @@ -156,6 +162,7 @@ public class CameraController { write.write(jsonObject.toJSONString()); write.flush(); write.close(); + log.info("downloadConfig"); return Result.success(); }