解决 com.alibaba.fastjson.JSONException: autoType is not support

时间:2017-07-19 18:27:44   收藏:0   阅读:3470

打开autotype功能

1、JVM启动参数

-Dfastjson.parser.autoTypeSupport=true

2、代码中设置

ParserConfig.getGlobalInstance().setAutoTypeSupport(true); 

如果有使用非全局ParserConfig则用另外调用setAutoTypeSupport(true);
 
 
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!