一般情况下不处理直接传递json数据在windows环境下很正常,但是在linux环境下发生乱码,所以需要进行处理
js传递的json
var data=encodeURIComponent(encodeURIComponent(JSON.stringify(rows)));
param="rows="+data;
window.location.href= urlContent + param;
controller接收的处理
//rowString是传过来的json数据
rowsStr = URLDecoder.decode (rowsStr, "UTF-8");
JSONArray arr = JSONArray.fromObject (rowsStr);
dataBaseQueryIndicatorInfos = JSONArray.toList (arr, new DataBaseQueryIndicatorDto (),
new JsonConfig ());