From 93d5460eef52e2e4d8912f5234b2563bf19a566e Mon Sep 17 00:00:00 2001 From: Parker Date: Thu, 7 Jan 2021 12:18:05 +0800 Subject: [PATCH] =?UTF-8?q?Shiro=20=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opsli/core/security/shiro/filter/CustomShiroFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/security/shiro/filter/CustomShiroFilter.java b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/security/shiro/filter/CustomShiroFilter.java index 4b03e68..371067d 100644 --- a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/security/shiro/filter/CustomShiroFilter.java +++ b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/security/shiro/filter/CustomShiroFilter.java @@ -99,7 +99,8 @@ public class CustomShiroFilter extends AuthenticatingFilter { try { //处理登录失败的异常 Throwable throwable = e.getCause() == null ? e : e.getCause(); - ResultVo error = ResultVo.error(401, throwable.getMessage()); + ResultVo error = ResultVo.error(TokenMsg.EXCEPTION_TOKEN_LOSE_EFFICACY.getCode(), + TokenMsg.EXCEPTION_TOKEN_LOSE_EFFICACY.getMessage()); httpResponse.getWriter().print(error.toJsonStr()); } catch (IOException ignored) {} return false;