From ff382b86b7f85bfe34c37a83adf9b269be962576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=A6=82?= <8775@163.com> Date: Thu, 27 Feb 2025 20:27:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8Ctoken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gitee/sop/gateway/service/impl/RouteServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sop-gateway/src/main/java/com/gitee/sop/gateway/service/impl/RouteServiceImpl.java b/sop-gateway/src/main/java/com/gitee/sop/gateway/service/impl/RouteServiceImpl.java index 741188e9..fcc1e2e3 100755 --- a/sop-gateway/src/main/java/com/gitee/sop/gateway/service/impl/RouteServiceImpl.java +++ b/sop-gateway/src/main/java/com/gitee/sop/gateway/service/impl/RouteServiceImpl.java @@ -130,7 +130,9 @@ public class RouteServiceImpl implements RouteService { protected Object doAfterRoute(ApiRequestContext apiRequestContext, ApiInfoDTO apiInfoDTO, Object result) { Object ret = result; for (RouteInterceptor routeInterceptor : routeInterceptors) { - ret = routeInterceptor.afterRoute(apiRequestContext, apiInfoDTO, ret); + if (routeInterceptor.match(apiRequestContext, apiInfoDTO)) { + ret = routeInterceptor.afterRoute(apiRequestContext, apiInfoDTO, ret); + } } return ret; }