diff --git a/src/main/java/com/ruoyi/framework/shiro/web/filter/LogoutFilter.java b/src/main/java/com/ruoyi/framework/shiro/web/filter/LogoutFilter.java index 627a4a4d6..0b4b8a35f 100644 --- a/src/main/java/com/ruoyi/framework/shiro/web/filter/LogoutFilter.java +++ b/src/main/java/com/ruoyi/framework/shiro/web/filter/LogoutFilter.java @@ -46,7 +46,7 @@ public class LogoutFilter extends org.apache.shiro.web.filter.authc.LogoutFilter String redirectUrl = getRedirectUrl(request, response, subject); try { - User user = (User) ShiroUtils.getSubjct().getPrincipal(); + User user = ShiroUtils.getUser(); if (StringUtils.isNotNull(user)) { String loginName = user.getLoginName();