feat(security): 完善用户认证和权限管理

- 添加密码编码器,增强密码安全性
- 配置安全过滤链,实现无状态会话管理
- 更新用户详细信息获取逻辑,保留现有行为
This commit is contained in:
2025-08-04 16:23:02 +08:00
parent cb374bbc91
commit 8a52ad708f
2 changed files with 5 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
if (user == null) {
throw new UsernameNotFoundException("User not found with username: " + username);
}
return new org.springframework.security.core.userdetails.User(user.getUsername(), user.getPassword(), new ArrayList<>());
return new org.springframework.security.core.userdetails.User(user.getUsername(), user.getPassword(), new ArrayList<>()); // 账号,密码,权限
}
@Override