From 1ca4c26d816181c6dbe9f60ace518b66f62fc62e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?bug=E5=88=B6=E9=80=A0=E8=80=85?= <837099748@qq.com> Date: Wed, 7 Jul 2021 09:16:05 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E8=BF=94=E5=9B=9E=E5=80=BCcode401=20=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E8=BF=94=E5=9B=9E=E7=9A=84code200=EF=BC=8C=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E5=B0=B1=E4=BC=9A$message=E4=B8=80=E4=B8=8B=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=B8=8D=E4=BC=9A=E5=BC=B9?= =?UTF-8?q?=E5=87=BA401=E9=87=8D=E6=96=B0=E7=99=BB=E5=BD=95=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E7=9A=84=E5=BC=B9=E6=A1=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/gateway/filter/AuthFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/AuthFilter.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/AuthFilter.java index 1bd39940b..3771b46d1 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/AuthFilter.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/AuthFilter.java @@ -95,7 +95,7 @@ public class AuthFilter implements GlobalFilter, Ordered return response.writeWith(Mono.fromSupplier(() -> { DataBufferFactory bufferFactory = response.bufferFactory(); - return bufferFactory.wrap(JSON.toJSONBytes(R.fail(msg))); + return bufferFactory.wrap(JSON.toJSONBytes(R.fail(HttpStatus.UNAUTHORIZED.value(), msg))); })); }