前端时间复习了SSM,前后端传数据接收,做了个例子,分享下
POM
org.springframework.boot
spring-boot-starter-test
test
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-thymeleaf
com.alibaba
fastjson
1.2.4
org.apache.commons
commons-pool2
org.springframework.boot
spring-boot-maven-plugin
HTML
TestIndexgogogogogogo
test3
function test3(){
var data=[];
data.push({"id":"123123","name":"zhangsan","age":"1"},{"id":"1231233","name":"lisi","age":"2"});
var params=JSON.stringify(data);
console.log(params);
$.ajax({
type:"post",
url:"/test3",
data: {"