采用@DeleteMapping注解无法支持post请求
页面报错如下:
There was an unexpected error (type=Method Not Allowed, status=405).
Request method ‘POST’ not supported
控制台报错如下:
Resolved[org.springframework.web.HttpRequestMethodNotSupportedException: Request method ‘POST’ not supported]
经查究,springboot默认关闭了hiddenmethod 过滤器,
在application.properties 中将过滤器设置启用即可
spring.mvc.hiddenmethod.filter.enabled=true
欢迎访问个人博客 link (点击link).
来源:CSDN
作者:ag
链接:https://blog.csdn.net/idtwtbbald/article/details/103482298