为空的字段,也进行序列号

This commit is contained in:
阿沐 2024-04-03 13:58:42 +08:00
parent 1e15bb33cf
commit 6023cde79f

View File

@ -38,7 +38,7 @@ public class JacksonConfig {
new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
builder.deserializerByType(LocalTime.class,
new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
builder.serializationInclusion(JsonInclude.Include.NON_NULL);
// builder.serializationInclusion(JsonInclude.Include.NON_NULL);
builder.failOnUnknownProperties(false);
builder.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
};