|
|
@@ -17,6 +17,7 @@
|
|
|
package com.jfinal.json;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.parser.ParserConfig;
|
|
|
import com.alibaba.fastjson.serializer.SerializeConfig;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
@@ -29,6 +30,9 @@ public class FastJson extends Json {
|
|
|
static {
|
|
|
// 支持序列化 ActiveRecord 的 Record 类型
|
|
|
SerializeConfig.getGlobalInstance().put(Record.class, new FastJsonRecordSerializer());
|
|
|
+
|
|
|
+ // 完全禁用 autoType,提升安全性
|
|
|
+ ParserConfig.getGlobalInstance().setSafeMode(true);
|
|
|
}
|
|
|
|
|
|
public static FastJson getJson() {
|