jackson解析LocalDateTime报错解决
在字段上添加注释
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;
}