_method: “PUT“和_method: “DELETE“不起作用

问题:

springboot从2.0.6升级到2.2.6

put和delete请求等不起作用,只有get和post请求起作用。

 

解决:

在application.properties中配置如下:

# 开启mvc的HiddenHttpMethodFilter,使表单可以发送PUT、DELETE等请求
spring.mvc.hiddenmethod.filter.enabled=true

 

你可能感兴趣的:(SpringBoot,spring,boot)