spring-gateway-context.xml
2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?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="privateKeyMap" class="org.springframework.beans.factory.config.YamlMapFactoryBean">
<property name="resources">
<list>
<value>classpath:body-sign-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>/html</value>
</list>
</property>
<property name="local">
<value>/service_control</value>
</property>
<property name="checkSessionMethods" ref="validateMethodMap" />
</bean>
<bean id="bodyParamCheckInterceptor" class="com.yohoufo.common.interceptor.BodySignatureCheckInterceptor">
<property name="isDebugEnable" value="${is_debug_enable:false}" />
<property name="keyConfigMap" ref="privateKeyMap" />
</bean>
<bean id="signatureVerifyInterceptor" class="com.yohoufo.common.interceptor.SignatureVerifyInterceptor">
<property name="isDebugEnable" value="${is_debug_enable:false}" />
<property name="checkMethods" ref="validateMethodMap"/>
<property name="excludeUrls">
<list>
<value>/html</value>
</list>
</property>
</bean>
<bean id="localIpInterceptor" class="com.yohoufo.common.interceptor.RemoteIPInterceptor" />
<bean id="innerApiInterceptor" class="com.yohoufo.common.interceptor.InnerApiInterceptor">
<property name="enableDebug" value="${is_debug_enable:false}" />
</bean>
<!-- 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>