处理异常:org.......PageNotFound.handleHttpRequestMethodNotSupported Request method 'POST' not supported

异常问题:

1.org.springframework.web.servlet.PageNotFound.handleHttpRequestMethodNotSupported Request method 'POST' not supported
2.Request method 'POST' not supported

你应该是用的Tomcat 8或者9,需要加入如下解决方法:需要在web.xml配置过滤器,亲测有效~

	<filter>
       <filter-name>HiddenHttpMethodFilter</filter-name>
       <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
   </filter>
 
   <filter-mapping>
       <filter-name>HiddenHttpMethodFilter</filter-name>
       <url-pattern>/*</url-pattern>
   </filter-mapping>

版权声明:本文为six_six_six原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。