From 55c3387415e55eb3638450eb33774e1dec7ba75b Mon Sep 17 00:00:00 2001 From: q Date: Wed, 14 Jan 2026 14:35:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20/json/parser=20?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=BC=98=E5=85=88=E7=BA=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 /json/parser 路由的 order 从 -1 改为 2000 - 确保优先于通配符路由 /json/:type/:key (order=1000) 注册 - 修复了接口返回 500 错误的问题 --- .../src/main/java/cn/qaiu/lz/web/controller/ServerApi.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web-service/src/main/java/cn/qaiu/lz/web/controller/ServerApi.java b/web-service/src/main/java/cn/qaiu/lz/web/controller/ServerApi.java index 4492d6b..201f2e2 100644 --- a/web-service/src/main/java/cn/qaiu/lz/web/controller/ServerApi.java +++ b/web-service/src/main/java/cn/qaiu/lz/web/controller/ServerApi.java @@ -42,7 +42,8 @@ public class ServerApi { return promise.future(); } - @RouteMapping(value = "/json/parser", method = RouteMethod.GET, order = 1) + // order=2000 确保此路由优先于 /json/:type/:key 匹配(数字越大越先注册) + @RouteMapping(value = "/json/parser", method = RouteMethod.GET, order = 2000) public Future parseJson(HttpServerRequest request, String pwd) { String url = URLParamUtil.parserParams(request); return cacheService.getCachedByShareUrlAndPwd(url, pwd, JsonObject.of("UA",request.headers().get("user-agent")));