Skip to content

Commit

Permalink
[代码优化](v2.6):序列化优化
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Dec 13, 2020
1 parent cbaa49f commit a97fb6b
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ public void configureMessageConverters(List<HttpMessageConverter<?>> converters)
supportMediaTypeList.add(MediaType.APPLICATION_JSON_UTF8);
FastJsonConfig config = new FastJsonConfig();
config.setDateFormat("yyyy-MM-dd HH:mm:ss");
config.setSerializerFeatures(
SerializerFeature.DisableCircularReferenceDetect,
//保留空的字段
SerializerFeature.WriteMapNullValue);
config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect);
converter.setFastJsonConfig(config);
converter.setSupportedMediaTypes(supportMediaTypeList);
converter.setDefaultCharset(StandardCharsets.UTF_8);
Expand Down

0 comments on commit a97fb6b

Please sign in to comment.