解决 fastjson 输出 $ref 引用问题

1
2
3
 FastJsonConfig fastJsonConfig = new FastJsonConfig();
 fastJsonConfig.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect); // 关闭引用检测
 fastConverter.setFastJsonConfig(fastJsonConfig);