zhoushihao
2024-04-25 2c2d541aa1c5060b47c1ba5c6e3d192b2ff82fef
hangzhoumesParent/common/springsecurity/src/main/java/com/mes/common/filter/JwtAuthenticationTokenFilter.java
@@ -60,8 +60,10 @@
        String redisKey = "login:" + userid;
        LoginUser loginUser = redisUtil.getCacheObject(redisKey);
        if (Objects.isNull(loginUser)) {
            response.setHeader("token", "");
            throw new RuntimeException("用户未登录");
        }
        //存入SecurityContextHolder,以供后面的过滤器使用
        List<String> permissionKeyList = menuMapper.selectPermsByUserId(Long.parseLong(userid));
        List<GrantedAuthority> authorities = permissionKeyList.stream().