chore: 清理冗余注释,保留字段/业务含义注释
This commit is contained in:
-3
@@ -9,8 +9,6 @@ import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class LocalDateTimeSerializer extends StdSerializer<LocalDateTime> {
|
||||
|
||||
// 修改为ISO 8601格式,末尾带Z,表示UTC时区
|
||||
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
|
||||
public LocalDateTimeSerializer() {
|
||||
@@ -22,7 +20,6 @@ public class LocalDateTimeSerializer extends StdSerializer<LocalDateTime> {
|
||||
if (value == null) {
|
||||
gen.writeNull();
|
||||
} else {
|
||||
// 这里假设LocalDateTime是UTC时间,直接格式化并加Z
|
||||
String formattedDate = value.format(formatter);
|
||||
gen.writeString(formattedDate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user