最近在学springboot,用的axios发送异步请求,在执行axios.delete方法时,出现Uncaught (in promise) Error: Request failed with status code 404
handleDelete(row) {
// console.log(row);
//当请求成功时,则执行.then,否则执行.catch,不管什么情况都要执行是.finally
axios.delete("/book/"+row.id).then((res)=>{
if (res.data.flag){
//添加成功给与提示
this.$message.success("删除数据成功");
}else{
this.$message.error("删除数据失败");
}
}).finally(()=>{
this.getAll();
});
},
后端controller层是基于restful风格写的
@DeleteMapping("{id}")
public Uniformity delete(@PathVariable Integer id){
Boolean flag=ibookService.removeById(id);
return new Uniformity(flag);
}
报错的具体图片如下

点exports http://localhost/js/axios-0.18.0.js:15这个进去提示是这样的,new有个下划线,但是我不太明白。
