<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	修改说明:
	1.修改<context:component-scan以确定要加载的controller,默认为com.**.controller
	2.修改class=ControllerClassNameHandlerMapping节点的pathPrefix以确定要生成的前缀
 -->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">

	<!-- 对controller包进行扫描，实现注释驱动Bean定义，同时将bean自动注入容器中使用。即解决了@Controller标识的类的bean的注入和使用 -->
	<context:component-scan base-package="com.**.web"/>
	
	<!-- 相当于注册了DefaultAnnotationHandlerMapping和AnnotationMethodHandlerAdapter两个bean，配置一些messageconverter。即解决了@Controller注解的使用前提配置 -->
	<mvc:annotation-driven>
		<mvc:message-converters register-defaults="true">
			<bean class="org.springframework.http.converter.StringHttpMessageConverter">
				<property name="supportedMediaTypes" value="text/plain;charset=UTF-8" />
			</bean>
		</mvc:message-converters>
	</mvc:annotation-driven>

    <mvc:interceptors>
        <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/>
        <mvc:interceptor>
            <!-- 匹配的是url路径， 如果不配置或/**,将拦截所有的Controller -->
            <mvc:mapping path="/**"/>
            <bean class="com.blueland.bpm.manage.interceptor.ProcessModelerUrlInterceptor"></bean>
        </mvc:interceptor>
    </mvc:interceptors>
	
 	<!-- 对模型视图名称的解析，即在模型视图名称添加前后缀 -->
    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
        <property name="prefix" value="/pages"/>
        <property name="suffix" value=".jsp"></property>
    </bean>
    
    
	<bean id="multipartResolver"  class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> 
            <!-- one of the properties available; the maximum file size in bytes --> 
            <property name="maxUploadSize" value="10000000"/> 
    </bean> 
  
    <!-- Mapping exception to the handler view -->
    <bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
        <property name="exceptionMappings">
            <props>
            </props>
        </property>
    </bean>
</beans>