spring-webmvc.xml 1.97 KB
<?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"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
                        http://www.springframework.org/schema/mvc
                        http://www.springframework.org/schema/mvc/spring-mvc.xsd ">

	<mvc:resources mapping="/easyui/**" location="/easyui/" />
	<mvc:resources mapping="/html/**" location="/html/" />
	<mvc:resources mapping="/css/**" location="/css/" />
	<mvc:resources mapping="/images/**" location="/images/" />
	<mvc:resources mapping="/js/**" location="/js/" />


	<bean id="urlInterceptor" class="com.yoho.ufo.interceptor.UrlInterceptor">
		<!--&lt;!&ndash; 一级免过滤列表(不需要登录,就可以访问的url) &ndash;&gt;-->
		<property name="firstNoFilterList">
			<list>
				<value>platformLogin.do</value>
				<value>logout.do</value>
				<value>updateVideoUrl</value>
			</list>
		</property>
	</bean>

	<mvc:interceptors>
		<ref bean="urlInterceptor" />
		<ref bean="threadProfileInterceptor"/>
	</mvc:interceptors>

	<bean id="requestFactory" class="org.springframework.http.client.SimpleClientHttpRequestFactory">
		<property name="readTimeout" value="60000"/>
		<property name="connectTimeout" value="10000"/>
	</bean>

	<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
		<constructor-arg ref="requestFactory"/>
		<!-- <property name="messageConverters">
			<list>
				<bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/>
				<bean class="org.springframework.http.converter.FormHttpMessageConverter"/>
				<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
			</list>
		</property> -->
	</bean>


	<mvc:cors>
		<mvc:mapping path="/**" />
	</mvc:cors>
</beans>