feat: 升级0.0.4,完成objectMapper优化,查询优化

This commit is contained in:
wangyu 2022-09-27 11:13:50 +08:00
parent 52d4a9062d
commit 499d35dabb

View File

@ -2,6 +2,7 @@ package group.flyfish.fluent.utils.data;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
@ -21,6 +22,7 @@ public final class ObjectMappers {
.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")) .setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"))
.setSerializationInclusion(JsonInclude.Include.NON_NULL) .setSerializationInclusion(JsonInclude.Include.NON_NULL)
.enable(JsonGenerator.Feature.IGNORE_UNKNOWN) .enable(JsonGenerator.Feature.IGNORE_UNKNOWN)
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
} }