spring-gateway-context.xml 2.01 KB
<?xml  version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			 xmlns="http://www.springframework.org/schema/beans"
			 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
	<!-- secutity configs -->
	<bean id="securityConfigMap" class="org.springframework.beans.factory.config.YamlMapFactoryBean">
		<property name="resources">
			<list>
				<value>classpath:security-key.yml</value>
			</list>
		</property>
	</bean>

	<!-- validate session and signature methods-->
	<bean id="validateMethodMap" class="org.springframework.beans.factory.config.YamlMapFactoryBean">
		<property name="resources">
			<list>
				<value>classpath:validate-method.yml</value>
			</list>
		</property>
	</bean>



	<!--  ********************  interceptors  ******************** -->
	<bean id="securityInterceptor" class="com.yohoufo.common.interceptor.SecurityInterceptor">
		<property name="isDebugEnable" value="${is_debug_enable:false}" />
		<property name="excludeUrls">
			<list>
				<value>/jsp</value>
				<value>/erp</value>
				<value>/payment</value>
				<value>/purchase</value>
				<value>/guang</value>
			</list>
		</property>
		<property name="local">
			<value>/service_control</value>
		</property>
		<property name="checkSessionMethods" ref="validateMethodMap" />
	</bean>
	<bean id="signatureVerifyInterceptor" class="com.yohoufo.common.interceptor.SignatureVerifyInterceptor">
		<property name="isDebugEnable" value="${is_debug_enable:false}" />
		<property name="checkMethods" ref="validateMethodMap"/>
	</bean>
	<bean id="localIpInterceptor" class="com.yohoufo.common.interceptor.RemoteIPInterceptor" />
	<!-- end -->

	<bean id="redisGwCacheClient" class="com.yohoufo.common.cache.RedisGwCacheClient">
	</bean>
	<bean id="consultConfigMap" class="org.springframework.beans.factory.config.YamlMapFactoryBean">
		<property name="resources">
			<list>
				<value>classpath:consult-common.yml</value>
			</list>
		</property>
	</bean>

</beans>