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(); }