出现 No mapping for DELETE/GET等
错误一:请求url不对
修改前
如下图可知后端请求url为http://localhost:8080/user/addressBook
运行后控制台出现
发现后端请求url比前端请求url少了/
改正:
在@DeleteMapping后面加上 /
java">@DeleteMapping("/")@ApiOperation("根据id删除地址")public Result deleteById(@RequestParam Long id) {addressBookService.deleteById(id);return Result.success();}