"...src/main/java/git@ustchcs.com:gujinli1118/eladmin.git" did not exist on "c9614bd77c67d97c8532b20f7f831de970ed632f"
Commit a97fb6ba authored by zhengjie's avatar zhengjie
Browse files

[代码优化](v2.6):序列化优化

parent cbaa49fb
...@@ -78,10 +78,7 @@ public class ConfigurerAdapter implements WebMvcConfigurer { ...@@ -78,10 +78,7 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
supportMediaTypeList.add(MediaType.APPLICATION_JSON_UTF8); supportMediaTypeList.add(MediaType.APPLICATION_JSON_UTF8);
FastJsonConfig config = new FastJsonConfig(); FastJsonConfig config = new FastJsonConfig();
config.setDateFormat("yyyy-MM-dd HH:mm:ss"); config.setDateFormat("yyyy-MM-dd HH:mm:ss");
config.setSerializerFeatures( config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect);
SerializerFeature.DisableCircularReferenceDetect,
//保留空的字段
SerializerFeature.WriteMapNullValue);
converter.setFastJsonConfig(config); converter.setFastJsonConfig(config);
converter.setSupportedMediaTypes(supportMediaTypeList); converter.setSupportedMediaTypes(supportMediaTypeList);
converter.setDefaultCharset(StandardCharsets.UTF_8); converter.setDefaultCharset(StandardCharsets.UTF_8);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment