From b9f0abf6172bfc29e42dbade8f853c0932bef4cf Mon Sep 17 00:00:00 2001 From: wangqing <408564126@qq.com> Date: Mon, 5 Feb 2024 12:15:26 +0800 Subject: [PATCH] fix(journal list date format) --- luoo_music/src/main/java/com/luoo/music/pojo/Comment.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/luoo_music/src/main/java/com/luoo/music/pojo/Comment.java b/luoo_music/src/main/java/com/luoo/music/pojo/Comment.java index 0784883..012c40b 100644 --- a/luoo_music/src/main/java/com/luoo/music/pojo/Comment.java +++ b/luoo_music/src/main/java/com/luoo/music/pojo/Comment.java @@ -1,7 +1,9 @@ package com.luoo.music.pojo; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.springframework.data.annotation.Id; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; @@ -15,6 +17,8 @@ public class Comment implements Serializable { // 评论内容 private String content; // 发布时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date publishTime; private String userId;