From 8f206400188cf84ea24bd13bdccf9860239287e4 Mon Sep 17 00:00:00 2001 From: yanlongqi Date: Sat, 28 Dec 2024 20:42:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=A7=86=E9=A2=91=20URL=20?= =?UTF-8?q?=E5=92=8C=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 `VideoController` 中的视频 URL 前缀更改为 `/api`,并在 `application.yml` 中添加了 `context-path` 配置。删除了 `application-prod.yml` 中重复的 `context-path` 配置。 --- .../crawler/video/models/controller/VideoController.java | 2 +- src/main/resources/application-prod.yml | 5 +---- src/main/resources/application.yml | 4 +++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/top/yuchat/crawler/video/models/controller/VideoController.java b/src/main/java/top/yuchat/crawler/video/models/controller/VideoController.java index da2bbd3..b87dcde 100644 --- a/src/main/java/top/yuchat/crawler/video/models/controller/VideoController.java +++ b/src/main/java/top/yuchat/crawler/video/models/controller/VideoController.java @@ -45,7 +45,7 @@ public class VideoController { @GetMapping("/madou/{id}") public JsonResult getMadouVideoById(@PathVariable Long id) { MadouVideoInfo madouVideoInfo = madouVideoService.getById(id); - madouVideoInfo.setM3u8Url("/video/" + id + "/index.m3u8"); + madouVideoInfo.setM3u8Url("/api/video/" + id + "/index.m3u8"); return JsonResult.ok(madouVideoInfo); } diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 6180182..ebe0af8 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -9,7 +9,4 @@ spring: # 日志级别,生产环境改为warn logging: level: - root: info -server: - servlet: - context-path: /api \ No newline at end of file + root: info \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index fc7e4d0..2f7e697 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,4 +1,6 @@ - +server: + servlet: + context-path: /api minio: endpoint: http://minio.yuchat:9000