Add dateformat option for fastjson (#1623)

pull/1625/head
superheizai 4 years ago committed by GitHub
parent e392950f9b
commit 1fca980f15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -125,9 +125,7 @@ public class ArthasBootstrap {
String outputPath = System.getProperty("arthas.output.dir", "arthas-output");
arthasOutputDir = new File(outputPath);
arthasOutputDir.mkdirs();
// disable fastjson circular reference feature
JSON.DEFAULT_GENERATE_FEATURE |= SerializerFeature.DisableCircularReferenceDetect.getMask();
initFastjson();
// 1. initSpy()
initSpy();
@ -165,6 +163,13 @@ public class ArthasBootstrap {
Runtime.getRuntime().addShutdownHook(shutdown);
}
private void initFastjson() {
// disable fastjson circular reference feature
JSON.DEFAULT_GENERATE_FEATURE |= SerializerFeature.DisableCircularReferenceDetect.getMask();
// add date format option for fastjson
JSON.DEFAULT_GENERATE_FEATURE |= SerializerFeature.WriteDateUseDateFormat.getMask();
}
private void initBeans() {
this.resultViewResolver = new ResultViewResolver();

Loading…
Cancel
Save