SpringMVC->web.xml 配置静态资源访问

<!--  设置静态文件访问  -->
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.jpg</url-pattern>
  </servlet-mapping>
  
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.js</url-pattern>
  </servlet-mapping>
  
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>*.css</url-pattern>
  </servlet-mapping>

 

posted @ 2017-02-23 22:41  CMelody  阅读(3554)  评论(0编辑  收藏  举报