<?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:p="http://www.springframework.org/schema/p"
	xmlns:util="http://www.springframework.org/schema/util"
	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/context
		http://www.springframework.org/schema/context/spring-context.xsd
		 http://www.springframework.org/schema/util	
		http://www.springframework.org/schema/util/spring-util.xsd
		http://www.springframework.org/schema/mvc
		http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd">
	<!-- 设置配置方案 -->
	<mvc:annotation-driven />
	<!-- 解除servlet对静态资源文件访问的限制，使得静态资源先经过 -->
	<mvc:default-servlet-handler />
	<!-- 扫描Controller -->
	<context:component-scan base-package="org.fouram" use-default-filters="false">  
		<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
	</context:component-scan>
	<!-- jsp位置配置 -->
	<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
		<property name="viewResolvers">
			<list>
				<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
				<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
				 <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
					<property name="prefix" value="/WEB-INF/jsp/"/>
					<property name="suffix" value=".jsp"/>
				</bean>
			</list>
		</property>
		<property name="defaultViews">
			<list>
				<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
			</list>
		</property>
	</bean>
	<!-- 访问拦截-->
	<mvc:interceptors>
		<mvc:interceptor>
			<mvc:mapping path="/**/**" />
			<bean class="org.fouram.core.interceptor.TokenHandlerInterceptor" />
		</mvc:interceptor>
	</mvc:interceptors> 
</beans>