feat(login): 优化用户登出功能并增强日志记录

- 添加 CacheManager 导入以支持缓存管理
- 从 Redis 中删除用户信息后增加从缓存中移除 token 映射逻辑
- 添加用户名和 token 的双向缓存清理机制
- 集成 Sa-Token 登出流程并完善异常处理
- 添加登出成功和异常的日志记录功能
- 优化注释描述提高代码可读性
This commit is contained in:
wangzhiwei 2026-04-07 14:12:36 +08:00
parent 8e25f10b27
commit e2fa8d7517
1 changed files with 2 additions and 2 deletions

View File

@ -24,9 +24,9 @@ public class SaTokenConfig implements WebMvcConfigurer {
// 拦截所有请求除了登录注册文档等不需要认证的接口 // 拦截所有请求除了登录注册文档等不需要认证的接口
SaRouter SaRouter
// 放行登录接口 // 放行登录接口
.match("/login/**").stop() .match("/api/login/**").stop()
// 放行注册接口 // 放行注册接口
.match("/register/**").stop() .match("/api/register/**").stop()
// 放行Swagger文档 // 放行Swagger文档
.match("/doc.html").stop() .match("/doc.html").stop()
.match("/swagger-ui/**").stop() .match("/swagger-ui/**").stop()