feat: 添加随机内容模块并优化安全配置
新增Nonsense相关实体、DTO、Repository、Service和Controller,实现随机内容的CRUD功能 优化CORS和安全配置,增加更精细的权限控制和错误处理 移除Article和Message中不必要的验证注解,调整部分API的权限要求
This commit is contained in:
@@ -8,7 +8,6 @@ import java.util.Date;
|
||||
public class Message {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@Column(name = "messageid")
|
||||
private Integer messageid;
|
||||
|
||||
@@ -21,6 +20,9 @@ public class Message {
|
||||
@Column(name = "content", columnDefinition = "text")
|
||||
private String content;
|
||||
|
||||
@Column(name = "messageimg")
|
||||
private String messageimg;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "created_at")
|
||||
private Date createdAt;
|
||||
@@ -37,6 +39,7 @@ public class Message {
|
||||
@Column(name = "likes")
|
||||
private Integer likes; // 点赞数
|
||||
|
||||
|
||||
public Integer getLikes() {
|
||||
return likes;
|
||||
}
|
||||
@@ -108,4 +111,12 @@ public class Message {
|
||||
public void setArticleid(Integer articleid) {
|
||||
this.articleid = articleid;
|
||||
}
|
||||
|
||||
public String getMessageimg() {
|
||||
return messageimg;
|
||||
}
|
||||
|
||||
public void setMessageimg(String messageimg) {
|
||||
this.messageimg = messageimg;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user