优化代码

This commit is contained in:
smallchill 2019-02-12 18:06:48 +08:00
parent 872ecf9143
commit 63716ac9fc

View File

@ -315,9 +315,6 @@ public class JsonUtil {
super.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); super.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
//反序列化时属性不存在的兼容处理s //反序列化时属性不存在的兼容处理s
super.getDeserializationConfig().withoutFeatures(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); super.getDeserializationConfig().withoutFeatures(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
//序列化处理
super.setSerializerFactory(this.getSerializerFactory().withSerializerModifier(new BladeBeanSerializerModifier()));
super.getSerializerProvider().setNullValueSerializer(BladeBeanSerializerModifier.NullJsonSerializers.STRING_JSON_SERIALIZER);
//日期格式化 //日期格式化
super.registerModule(new BladeJavaTimeModule()); super.registerModule(new BladeJavaTimeModule());
super.findAndRegisterModules(); super.findAndRegisterModules();