feat(security): 实现JWT认证与授权功能
重构用户登录服务,引入Spring Security和JWT认证机制 - 新增JwtUtils工具类处理JWT生成与验证 - 添加JwtAuthenticationFilter拦截请求验证token - 实现UserDetailsService从数据库加载用户信息 - 创建AuthController处理登录请求返回JWT - 重构用户角色权限相关接口,支持基于角色的访问控制 - 移除旧的安全配置,启用新的SecurityConfig - 新增LoginResponse DTO替代旧的LoginUser - 优化用户密码加密存储,使用BCryptPasswordEncoder
This commit is contained in:
@@ -23,7 +23,6 @@ public class RolePermissions {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id; // 关联ID,主键,自增
|
||||
|
||||
private Long roleId; // 角色ID,外键,关联roles表
|
||||
private Long permissionId; // 权限ID,外键,关联permissions表
|
||||
private Date createdAt; // 创建时间
|
||||
|
||||
Reference in New Issue
Block a user