今天寫SpringMVC的攔截器的時候遇到這樣一個錯誤
Element mvc:exclude-mapping is not allowed here.
經過一番搜尋找到了原因。
SpringMVC在3.2版本之前是不支援mvc:exclude-mapping 标簽的。
可以将把
<a href="http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd</a>
改成
<a href="http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd</a>
這樣問題可以得到解決。
歡迎轉載分享是進步的源泉。