在字段上添加注释
class Data {
private String status;
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
@JsonSerialize(using = LocalDateTimeSerializer.class)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime timestamp;
private String type;
private Double value;
}
标签:JsonFormat,jackson,private,报错,LocalDateTime,class
From: https://www.cnblogs.com/xl4ng/p/16795953.html