添加自定义日志管理,输出到日志文件

This commit is contained in:
2024-01-09 13:54:32 +08:00
parent 80976f45a7
commit 6fbcab9351
3 changed files with 96 additions and 6 deletions

View File

@@ -110,12 +110,12 @@ public class AuthenticationFilter extends OncePerRequestFilter {
//校验token
String cacheToken = LocalCacheUtils.getTokenCache(String.valueOf(principal.getId()));
// if(StringUtils.isEmpty(cacheToken)){
// throw new RuntimeException("TOKEN已过期请重新登录");
// }
// if(!cacheToken.equals(jwtToken) ){
// throw new RuntimeException("TOKEN已过期请重新登录");
// }
if(StringUtils.isEmpty(cacheToken)){
throw new RuntimeException("TOKEN已过期请重新登录");
}
if(!cacheToken.equals(jwtToken) ){
throw new RuntimeException("TOKEN已过期请重新登录");
}
// UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(null, null);
// SecurityContextHolder.getContext().setAuthentication(authentication);
}