1.SpringBoot 如何从前台传递数组

 

 

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

 

2、前台

 

$.ajax({
                    url: 'deleteBsGiftById',
                    type: 'post',
                    dataType: 'json',
                    data: {
                        ids: idArray
                    }
)}

 

 

3、后台接收

  @PostMapping("deleteBsGiftById")
    @ResponseBody
    public boolean deleteBsGiftById(@RequestParam(value = "ids[]") String[] ids) {
        return true;
    }

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄