springmvc url-pattern and static resources

来源:互联网 发布:faker知乎 编辑:程序博客网 时间:2024/06/06 10:50

(1) these code intercept all requests

<servlet-mapping>    <servlet-name>springMVC</servlet-name>    <url-pattern>/</url-pattern>  </servlet-mapping>

(2)static resource like html, js, css, fonts should be opened for every request.
If you have used settings as step (1), static resources will be intercept either, you should use <mvc:resources/> to build a map to open access. <mvc:resources/> could map static resources in WEB-INF.

原创粉丝点击