zoukankan      html  css  js  c++  java
  • axios delete 传数组,后台spring boot

    改了两小时....最后发现是自己脑子卡了,按postman那样传参就行了

    前端axios

    axios.delete('http://127.0.0.1:8080/cfg1', {data:this.selected}).then(res => { 
                                    this.getData(1)
                                }, error => {
                                    console.log(error.response)                               
                                }).catch(function (error) {
                                    console.log(error)
                             })
     
    后台
    @DeleteMapping(value = "/alarmCfg1")
    public boolean delete(@RequestBody List<Integer> ids){
    return alarmcfgtableService.removeByIds(ids); }
  • 相关阅读:
    linux文件操作
    文件和目录维护
    随心而记
    开学了
    基本逻辑门电路原理
    ubuntu搭建ftp服务
    中断
    数码管
    字,寻址和移位
    Error: Could not find or load main class resourcemanager
  • 原文地址:https://www.cnblogs.com/MarsMercury/p/12445274.html
Copyright © 2011-2022 走看看