SpringBoot 后台通过@RequestBody 接受参数 前台jq Ajax 和 Axios 怎么传递
$.ajax({
url:commomUrl+url,
contentType: 'application/json;charset=UTF-8', //1.设置请求头
dataType:"json",
type:type,
// headers:{token:token},
// async:asyncs,
data:JSON.stringify(data), //2.数据要 JSON.stringify一下
});
//axios 也是首先设置请求头 在把要传递给后台的数据进行 JSON.stringify