JS

var param= new Array();
var one= new Object;
one.id = '1';
one.name= 'simba1';
param.push(one);

var two= new Object;
two.id = '2';
two.name= 'simba2';
param.push(two);

$.ajax({
async : false,
cache : false,
type : 'POST',
dataType:"json",      
            contentType:'application/json;charset=UTF-8',
url : 'test.htm',
data : JSON.stringify(param),
error : function(data) {
  alert("载入数据错误,请重试!");
   },
success : function(data) {

}
});


JAVA

POJO

public class Test{

public Long Id;

public String name;

get***

set**

}



controller

@RequestMapping(value = "test.thm", method = RequestMethod.POST)
    @ResponseBody
    public Boolean editQhbPrizeChance(@RequestBody Test[] test) {

}

相关文章:

  • 2021-09-16
  • 2021-09-14
  • 2021-10-18
  • 2022-12-23
  • 2021-05-04
  • 2021-05-26
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2021-09-20
  • 2022-01-19
相关资源
相似解决方案