前端:POST + JSON ; 后端取参:@RequestParam(value = "pageSize") Integer pageSize ....
/**
* 初始化表格数据
*/
function initTable(){
var jsonObject = {"pageNumber":1,"pageSize":5,"sortName":"userId","sortOrder":"asc"};
$.ajax({
type:'POST',// post时必须用'application/x-www-form-urlencoded',模拟表单提交,而不是body提交
url:'/users/ulist',
async : false,// 必须同步!!
dataType: "json",
data: jsonObject, // 后台用 “@RequestParam” 取参数值时,此处不要转化“JSON.stringify(jsonObject)”
contentType: 'application/x-www-form-urlencoded', // 'application/x-www-form-urlencoded','application/json'
success: function( rs ){
layer