2019-10-29 11:11
补充一下springboot中JFinal Record对象fastjson的返回
public class RecordSerializer implements ObjectSerializer{
@Override
public void write(JSONSerializer jsonSerializer, Object o, Object o1, Type type, int i) throws IOException {
if (o != null) {
Record record = (Record)o;
jsonSerializer.write(record.getColumns());
}
}
}
在fastjson初始化的地方加上
SerializeConfig.getGlobalInstance().put(Record.class, new RecordSerializer());
2019-03-07 17:41
@JFinal 波总,已经测试了,不会再多加一个contextpath了
2019-03-07 17:22
@Ommmmmmmm maven项目得话,fastjson改一下版本号,web项目的话下个新版的fastjson的jar包就行了