| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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" |
| | | xmlns:aop="http://www.springframework.org/schema/aop" |
| | | xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd |
| | | http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd |
| | | http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd |
| | | http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> |
| | | |
| | | <!-- èªå¨æ«æä¸åªæ«æ@Controller --> |
| | | <context:component-scan base-package="com.hxzkoa.controller" use-default-filters="false"> |
| | | <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/> |
| | | </context:component-scan> |
| | | |
| | | <mvc:annotation-driven> |
| | | <mvc:message-converters register-defaults="true"> |
| | | <bean id="jsonConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"> |
| | | <property name="supportedMediaTypes" value="text/html;charset=UTF-8" /> |
| | | </bean> |
| | | </mvc:message-converters> |
| | | </mvc:annotation-driven> |
| | | <aop:aspectj-autoproxy/> |
| | | <!-- å°æ æ³mappingå°Controllerçpath交ç»default servlet handlerå¤ç --> |
| | | <!-- <mvc:default-servlet-handler/> --> |
| | | <mvc:resources mapping="/static/**" location="/static/"/> |
| | | |
| | | <!-- å®ä¹JSPæä»¶çä½ç½® --> |
| | | <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> |
| | | <property name="prefix" value="/WEB-INF/"/> |
| | | <property name="suffix" value=".jsp"/> |
| | | </bean> |
| | | |
| | | <!-- ä¸ä¼ file--> |
| | | <bean id="multipartResolver" |
| | | class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> |
| | | <!--resolveLazily屿§å¯ç¨æ¯ä¸ºäºæ¨è¿æä»¶è§£æï¼ä»¥ä¾¿å¨UploadAction ä¸æè·æä»¶å¤§å°å¼å¸¸--> |
| | | <property name="resolveLazily" value="true"/> |
| | | <!-- one of the properties available; the maximum file size in bytes --> |
| | | <property name="maxUploadSize"> |
| | | <!-- æå¤§2M --> |
| | | <value>15728640</value> |
| | | <!-- 设置ä¸ä¼ æä»¶å¤§å° -1 为ä¸éå¶å¤§å° --> |
| | | </property> |
| | | <property name="maxInMemorySize"> |
| | | <value>15728640</value> |
| | | </property> |
| | | <property name="defaultEncoding"> |
| | | <value>UTF-8</value> |
| | | <!-- 设置ä¸ä¼ æ¶çç¼ç --> |
| | | </property> |
| | | </bean> |
| | | |
| | | </beans> |