diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java index d11d80f8..2f0af101 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java @@ -1,6 +1,6 @@ package com.ruoyi.common.security.handler; -import cn.dev33.satoken.exception.IdTokenInvalidException; +import cn.dev33.satoken.exception.SameTokenInvalidException; import cn.dev33.satoken.exception.NotLoginException; import cn.dev33.satoken.exception.NotPermissionException; import cn.dev33.satoken.exception.NotRoleException; @@ -60,8 +60,8 @@ public class GlobalExceptionHandler { /** * 无效认证 */ - @ExceptionHandler(IdTokenInvalidException.class) - public R handleIdTokenInvalidException(IdTokenInvalidException e, HttpServletRequest request) { + @ExceptionHandler(SameTokenInvalidException.class) + public R handleSameTokenInvalidException(SameTokenInvalidException e, HttpServletRequest request) { String requestURI = request.getRequestURI(); log.error("请求地址'{}',内网认证失败'{}',无法访问系统资源", requestURI, e.getMessage()); return R.fail(HttpStatus.UNAUTHORIZED, "认证失败,无法访问系统资源");