mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
Add dateformat option for fastjson (#1623)
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user