通过Ajax转入数组,后端通过@RequestBody接收


1、前端代码





清风








	

	
	
	
	
	


2、后端代码

    @ApiOperation("接收参数数组")
    @PostMapping("/array")
    public Result array( @RequestBody List array){
        for (Integer arr : array) {
            log.info("遍历的数组:"+arr);
        }
        return Result.ok();
    }

3、输出结果