js代码

 

function click(){
var arrays = new Array();
for (var i = 0; i < arr.length; i++) {
arrays.push("123");
}
$.ajax({
type: "post",
url: ,
data: {list:arrays}, 
dataType: "json",
success: function(data){

}
})
}

Java代码

@PostMapping(value = "/aaa")
    @ResponseBody
    public String addDynamicStateBase64s(@RequestParam("list[]")List<String> lsit){
        return null;
    }

 

接收参数的时候需要带中括号


 

相关文章:

  • 2021-11-26
  • 2021-08-12
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
猜你喜欢
  • 2021-11-12
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-08-27
  • 2022-12-23
相关资源
相似解决方案