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