From a43e6e06e086e778e6ac3fdba7b5e8fafa090ed8 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 17 一月 2022 12:03:15 +0800 Subject: [PATCH] update 优化多用户体系处理 更名 LoginUtils 为 LoginHelper 支持 LoginUser 多级缓存 --- ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java | 6 +----- 1 files changed, 1 insertions(+), 5 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..b76961a 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 @@ -4,11 +4,9 @@ import cn.dev33.satoken.exception.NotPermissionException; import cn.dev33.satoken.exception.NotRoleException; import cn.hutool.http.HttpStatus; -import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.exception.DemoModeException; import com.ruoyi.common.exception.ServiceException; -import com.ruoyi.common.utils.RedisUtils; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.context.support.DefaultMessageSourceResolvable; @@ -58,8 +56,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)); } @@ -69,7 +65,7 @@ */ @ExceptionHandler(HttpRequestMethodNotSupportedException.class) public AjaxResult<Void> handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e, - HttpServletRequest request) { + HttpServletRequest request) { String requestURI = request.getRequestURI(); log.error("璇锋眰鍦板潃'{}',涓嶆敮鎸�'{}'璇锋眰", requestURI, e.getMethod()); return AjaxResult.error(e.getMessage()); -- Gitblit v1.9.3