问题:
Springboot 2.x.x版本发生PUT、DELETE请求失败
解决方法:
一:
在spring boot 的配置文件 application.properties 中将 hiddenmethod 过滤器设置为true:
# 在appliction.properties中启用hiddenmethod过滤器
spring.mvc.hiddenmethod.filter.enabled=true
启用后仍无效,采用第二种方法
二:
在@Configuration注解的java类中加入以下代码:
@Bean
public HiddenHttpMethodFilter hiddenHttpMethodFilter