直接上结论:
因为 SpringBoot 版本原因,在我目前使用的 2.2.4 版本中,需要在springapplication.xml文件中 添加配置:
spring.mvc.hiddenmethod.filter.enabled = true
什么是 REST
Restful 目的只是让 url 看起来更简洁实用,是资源状态的一种表达。
在这里插入图片描述
Restful 的使用
由于 H5 的 form 表单仅支持 POST 和 GET 两种请求,实现 restfulAPI 还需要 PUT 和 DELETE ,所以需要使用 HiddenHttpMethodFilter 组件在发送HTTP请求时对请求类型进行伪装。