feat(security): 实现JWT认证并增强API安全控制
添加JWT依赖并实现token生成与验证功能 在控制器方法上添加权限注解保护API端点 更新安全配置以集成JWT过滤器 移除无用的编码测试工具类 修改JWT相关配置为更安全的设置
This commit is contained in:
@@ -9,8 +9,7 @@ public class ArticleDto {
|
||||
@NotBlank(message = "标题不能为空")
|
||||
private String title;
|
||||
|
||||
@NotBlank(message = "内容不能为空")
|
||||
private String content;
|
||||
private String content;// 如果为空说明是长篇文章 不为空则是短篇说说
|
||||
|
||||
@NotNull(message = "属性ID不能为空")
|
||||
private Integer attributeid;
|
||||
@@ -23,8 +22,7 @@ public class ArticleDto {
|
||||
|
||||
private Integer status;
|
||||
|
||||
@NotBlank(message = "Markdown内容不能为空")
|
||||
private String markdownscontent;
|
||||
private String markdownscontent; // 文章内容的Markdown格式
|
||||
|
||||
// Getters and Setters
|
||||
public Integer getArticleid() {
|
||||
|
||||
Reference in New Issue
Block a user