springMVC访问静态资源的两种方式

1<mvc:default-servlet-handler/>

 

2

<mvc:resources mapping="/images/**" location="/images/" cache-period="31556926"/>
<mvc:resources mapping="/js/**" location="/js/" cache-period="31556926"/>
<mvc:resources mapping="/css/**" location="/css/" cache-period="31556926"/>

posted on 2016-01-20 14:05  james-roger  阅读(164)  评论(0编辑  收藏  举报