<?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" xmlns:aop="http://www.springframework.org/schema/aop"
	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
	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd">

	<!-- 开启@AspectJ AOP代理 -->
	<aop:aspectj-autoproxy />

	<mvc:annotation-driven>
		<mvc:message-converters register-defaults="true">
			<!-- 避免IE执行AJAX时,返回JSON出现下载文件 -->
			<bean id="fastJsonHttpMessageConverter"
				class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
				<property name="supportedMediaTypes">
					<list>
						<value>application/json;charset=UTF-8</value>
					</list>
				</property>
				<property name="features">
					<list>
						<value>DisableCircularReferenceDetect</value>
					</list>
				</property>
			</bean>
		</mvc:message-converters>
	</mvc:annotation-driven>

	<mvc:default-servlet-handler />

	<mvc:resources mapping="/static/**" location="/resources/" />

	<context:component-scan base-package="com.uas.platform.b2b.manage" />

	<bean
		class="org.springframework.mobile.device.view.LiteDeviceDelegatingViewResolver">
		<constructor-arg>
			<bean
				class="org.springframework.web.servlet.view.InternalResourceViewResolver">
				<property name="prefix" value="/WEB-INF/views/" />
				<property name="suffix" value=".html" />
				<property name="contentType" value="text/html;charset=UTF-8" />
			</bean>
		</constructor-arg>
		<property name="normalPrefix" value="normal/" />
		<property name="mobilePrefix" value="mobile/" />
		<property name="tabletPrefix" value="mobile/" />
	</bean>

	<mvc:view-controller path="/" view-name="index" />
	<mvc:view-controller path="/index" view-name="index" />
	<mvc:view-controller path="/signIn" view-name="signIn" />
	<mvc:view-controller path="/enterprise" view-name="enterprise" />
	<mvc:view-controller path="/logList" view-name="logList" />
	<mvc:view-controller path="/schedularList" view-name="schedularList" />
	<mvc:view-controller path="/resetPassword" view-name="resetPassword" />
    <mvc:view-controller path="/invalid" view-name="invalid" />
    <mvc:view-controller path="/**#" view-name="signIn" />
	<mvc:view-controller path="/invite" view-name="inviteList" />
	<mvc:view-controller path="/notice" view-name="noticeList" />
    <mvc:view-controller path="/notice_detail" view-name="noticeDetail" />
	<mvc:view-controller path="/statisticsChart" view-name="statisticsChart" />
	<mvc:view-controller path="/listen" view-name="listen" />
	<mvc:view-controller path="/deputyOrder" view-name="deputyOrderList" />
	<mvc:interceptors>
		<!-- SSO过滤 -->
		<mvc:interceptor>
			<mvc:mapping path="/**/**"></mvc:mapping>
			<mvc:exclude-mapping path="/**/*.css"/>
			<mvc:exclude-mapping path="/**/*.js"/>
			<mvc:exclude-mapping path="/**/*signIn*"/>
            <mvc:exclude-mapping path="/**/login"/>
            <mvc:exclude-mapping path="/**/logout"/>
            <mvc:exclude-mapping path="/**/img/**"/>
			<mvc:exclude-mapping path="/**/register/**"/>
			<mvc:exclude-mapping path="/**/valid/**"/>
            <mvc:exclude-mapping path="/**/resetPwd/**"/>
            <mvc:exclude-mapping path="/**/*invalid*"/>
            <mvc:exclude-mapping path="/public/**" />
			<bean class="com.uas.platform.b2b.manage.web.filter.SsoInterceptor"></bean>
		</mvc:interceptor>
		<!-- 对所有的请求拦截，将Session中的User信息设置进SystemSession -->
		<mvc:interceptor>
			<mvc:mapping path="/**"></mvc:mapping>
			<bean class="com.uas.platform.b2b.manage.web.filter.SystemSessionInterceptor"></bean>
		</mvc:interceptor>
	</mvc:interceptors>

</beans>