静态资源增加缓存时间

This commit is contained in:
shuzheng 2016-12-30 15:14:18 +08:00
parent 513e552bee
commit 0fe077f89d
1 changed files with 2 additions and 2 deletions

View File

@ -51,8 +51,8 @@
<property name="defaultEncoding" value="UTF-8" />
</bean>
<!-- 配置静态资源不被DispatcherServlet处理 -->
<mvc:resources mapping="/resources/**" location="/resources/" />
<!-- 配置静态资源不被DispatcherServlet处理,增加缓存时间 -->
<mvc:resources mapping="/resources/**" location="/resources/" cache-period="10" />
<!-- 上传文件配置 20*1024*1024即20M resolveLazily属性启用是为了推迟文件解析以便捕获文件大小异常 -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">