报错异常:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sat Sep 05 16:44:02 CST 2020
There was an unexpected error (type=Method Not Allowed, status=405).
错误分析:
springboot2.0 WebMvcAutoConfiguration自动配置类中 hiddenHttpMethodFilter方法多了个条件注解,默认是关闭。
解决方式:
- 只需要在SpringBoot配置中【application.properties】配置:
spring.mvc.hiddenmethod.filter.enabled=true
就可以完美解决这个问题。