From 5aaa898f3c553c40dd774b40111d41a5922e85d0 Mon Sep 17 00:00:00 2001 From: caoyuan Date: Thu, 7 Sep 2023 15:53:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AE=BE=E7=BD=AESentinelInterceptor=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=87=AA=E5=AE=9A=E4=B9=89=E7=9A=84json?= =?UTF-8?q?=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/jboot/support/sentinel/SentinelInterceptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/jboot/support/sentinel/SentinelInterceptor.java b/src/main/java/io/jboot/support/sentinel/SentinelInterceptor.java index f7c1cb21..b3835e82 100644 --- a/src/main/java/io/jboot/support/sentinel/SentinelInterceptor.java +++ b/src/main/java/io/jboot/support/sentinel/SentinelInterceptor.java @@ -50,7 +50,7 @@ public class SentinelInterceptor extends AbstractSentinelInterceptor implements inv.setReturnValue(handleBlockException(inv, annotation, ex)); } catch (Throwable throwable) { if (inv.isActionInvocation()) { - inv.getController().renderText("Blocked by Sentinel " + ex.getRule()); + SentinelUtil.blockRequest(inv.getController().getRequest(), inv.getController().getResponse()); } else { throwable.printStackTrace(); } -- Gitee