26 lines
1.4 KiB
XML
26 lines
1.4 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||
xmlns:context="http://www.springframework.org/schema/context"
|
||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||
http://www.springframework.org/schema/context
|
||
http://www.springframework.org/schema/context/spring-context.xsd
|
||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||
<!-- 扫描Controller -->
|
||
<context:component-scan base-package="com.landaiqing.controller" />
|
||
<!-- 配置视图解析器 -->
|
||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||
<property name="suffix" value=".jsp" />
|
||
</bean>
|
||
<mvc:annotation-driven/>
|
||
<mvc:default-servlet-handler></mvc:default-servlet-handler>
|
||
<!-- SpringMVC上传文件时,需要配置MultipartResolver处理器 -->
|
||
<bean id="multipartResolver"
|
||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||
<property name="defaultEncoding" value="UTF-8" />
|
||
<!-- 指定所上传文件的总大小,单位字节。注意maxUploadSize属性的限制不是针对单个文件,而是所有文件的容量之和 -->
|
||
<property name="maxUploadSize" value="10240000" />
|
||
</bean>
|
||
</beans> |