springMVC:org.springframework.web.servlet.PageNotFound.handleHttpRequestMethodNotSupported Request method 'POST' not supported


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


Tomcat 8或者9下面的bug還是什么東西,需要加入如下解決方法:   

需要在web.xml配置過濾器

1
2
3
4
5
6
7
8
9
<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>


 






免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM