From da247c61b715dafaba58e8dd4f106f0954f6cbf4 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 09 十二月 2021 16:32:32 +0800 Subject: [PATCH] update 过滤离线用户 --- ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java index f5e07a0..60979dd 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java @@ -3,6 +3,7 @@ import cn.dev33.satoken.exception.NotLoginException; import cn.dev33.satoken.exception.NotPermissionException; import cn.dev33.satoken.exception.NotRoleException; +import cn.dev33.satoken.stp.StpUtil; import cn.hutool.http.HttpStatus; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.AjaxResult; @@ -58,8 +59,6 @@ @ExceptionHandler(NotLoginException.class) public AjaxResult<Void> handleAccessDeniedException(NotLoginException e, HttpServletRequest request) { String requestURI = request.getRequestURI(); - String token = e.getMessage().split("锛�")[1]; - RedisUtils.deleteObject(Constants.ONLINE_TOKEN_KEY + token); log.error("璇锋眰鍦板潃'{}',璁よ瘉澶辫触'{}',鏃犳硶璁块棶绯荤粺璧勬簮", requestURI, e.getMessage()); return AjaxResult.error(HttpStatus.HTTP_UNAUTHORIZED, StringUtils.format("璇锋眰鍦板潃'{}',璁よ瘉澶辫触'{}',鏃犳硶璁块棶绯荤粺璧勬簮", requestURI)); } -- Gitblit v1.9.3