123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?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:mvc="http://www.springframework.org/schema/mvc"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
- <mvc:annotation-driven/>
- <mvc:default-servlet-handler/>
-
- <context:component-scan base-package="com.fh.controller" />
- <context:component-scan base-package="com.json" />
- <!-- 对静态资源文件的访问 restful-->
- <!-- spring 4.3.7 可能会误报红叉,但不影响正常运行 -->
- <mvc:resources mapping="/admin/**" location="/,/admin/" />
- <mvc:resources mapping="/static/**" location="/,/static/" />
- <mvc:resources mapping="/mobile/**" location="/,/mobile/" />
- <mvc:resources mapping="/plugins/**" location="/,/plugins/" />
- <mvc:resources mapping="/uploadFiles/**" location="/,/uploadFiles/" />
- <mvc:resources location="/activiti-editor/" mapping="/activiti-editor/**" />
- <!-- 访问拦截 -->
- <mvc:interceptors>
- <mvc:interceptor>
- <mvc:mapping path="/**/**"/>
- <bean class="com.fh.interceptor.LoginHandlerInterceptor"/>
- </mvc:interceptor>
- </mvc:interceptors>
-
- <!-- 配置SpringMVC的视图解析器 -->
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/WEB-INF/jsp/"/>
- <property name="suffix" value=".jsp"/>
- </bean>
-
- <bean id="exceptionResolver" class="com.fh.resolver.MyExceptionResolver"></bean>
-
- <!-- 上传拦截,如最大上传值及最小上传值 -->
- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" >
- <property name="maxUploadSize">
- <value>104857600</value>
- </property>
- <property name="maxInMemorySize">
- <value>4096</value>
- </property>
- <property name="defaultEncoding">
- <value>utf-8</value>
- </property>
- </bean>
-
- </beans>
|