From 2ba55b4daedd7fdc767439d3af0819af6c55a709 Mon Sep 17 00:00:00 2001 From: fanfpy Date: Tue, 1 Jul 2025 17:04:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86Traefik=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E8=A7=84=E5=88=99=E4=B8=AD=E7=9A=84=E5=8D=95=E5=BC=95=E5=8F=B7?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E4=B8=BA=E5=8F=8D=E5=BC=95=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一所有服务配置文件中Traefik路由规则的路径前缀引号格式,从单引号改为反引号以保持一致性 --- consul/config/data-service.json | 2 +- consul/config/emotion-service.json | 2 +- consul/config/frontend.json | 2 +- consul/config/quant-service.json | 2 +- consul/config/recommend-service.json | 2 +- consul/config/user-service.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/consul/config/data-service.json b/consul/config/data-service.json index a70e02d..3abf2e8 100644 --- a/consul/config/data-service.json +++ b/consul/config/data-service.json @@ -9,7 +9,7 @@ "id": "data-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.data-service.rule=PathPrefix('/api/data')", + "traefik.http.routers.data-service.rule=PathPrefix(`/api/data`)", "traefik.http.routers.data-service.entrypoints=web" ], "name": "data-service", diff --git a/consul/config/emotion-service.json b/consul/config/emotion-service.json index fa6e12a..ed41d81 100644 --- a/consul/config/emotion-service.json +++ b/consul/config/emotion-service.json @@ -9,7 +9,7 @@ "id": "emotion-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.emotion-service.rule=PathPrefix('/api/emotion')", + "traefik.http.routers.emotion-service.rule=PathPrefix(`/api/emotion`)", "traefik.http.routers.emotion-service.entrypoints=web" ], "name": "emotion-service", diff --git a/consul/config/frontend.json b/consul/config/frontend.json index 50825fb..c0c512a 100644 --- a/consul/config/frontend.json +++ b/consul/config/frontend.json @@ -9,7 +9,7 @@ "id": "frontend-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.frontend.rule=PathPrefix('/')", + "traefik.http.routers.frontend.rule=PathPrefix(`/`)", "traefik.http.routers.frontend.entrypoints=web" ], "name": "frontend", diff --git a/consul/config/quant-service.json b/consul/config/quant-service.json index faff493..bcff10f 100644 --- a/consul/config/quant-service.json +++ b/consul/config/quant-service.json @@ -9,7 +9,7 @@ "id": "quant-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.quant-service.rule=PathPrefix('/api/quant')", + "traefik.http.routers.quant-service.rule=PathPrefix(`/api/quant`)", "traefik.http.routers.quant-service.entrypoints=web" ], "name": "quant-service", diff --git a/consul/config/recommend-service.json b/consul/config/recommend-service.json index b277a6f..098c2cb 100644 --- a/consul/config/recommend-service.json +++ b/consul/config/recommend-service.json @@ -9,7 +9,7 @@ "id": "recommend-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.recommend-service.rule=PathPrefix('/api/recommend')", + "traefik.http.routers.recommend-service.rule=PathPrefix(`/api/recommend`)", "traefik.http.routers.recommend-service.entrypoints=web" ], "name": "recommend-service", diff --git a/consul/config/user-service.json b/consul/config/user-service.json index 37c25a8..fbbcf9c 100644 --- a/consul/config/user-service.json +++ b/consul/config/user-service.json @@ -9,7 +9,7 @@ "id": "user-service-1", "tags": [ "traefik.enable=true", - "traefik.http.routers.user-service.rule=PathPrefix('/api/user')", + "traefik.http.routers.user-service.rule=PathPrefix(`/api/user`)", "traefik.http.routers.user-service.entrypoints=web" ], "name": "user-service",