ApplicationContext.xml
2.88 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
<?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:context="http://www.springframework.org/schema/context"
xmlns:api="http://www.xiniunet.com/api"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.xiniunet.com/api http://www.xiniunet.com/api/api.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<!--① 扫描Spring Bean-->
<context:component-scan base-package="com.xiniunet.open.api"/>
<context:component-scan base-package="com.xiniunet.open.tool"/>
<!-- 启动Rop框架 -->
<api:api-config
id="router"
session-manager="apiSessionManager"
app-secret-manager="appSecretManager"
service-access-controller="serviceAccessController"
service-timeout-seconds="60"
invoke-times-controller="invokeTimesController"
upload-file-max-size="10"
upload-file-types="png,gif,jpg"
core-pool-size="5000"
max-pool-size="20000"
queue-capacity="1000"
keep-alive-seconds="120" />
<bean id="apiSessionManager" class="com.xiniunet.open.manager.ApiSessionManager" />
<bean id="invokeTimesController" class="com.xiniunet.open.manager.ApiInvokeTimesController"/>
<bean id="appSecretManager" class="com.xiniunet.open.manager.ApiAppSecretManager"/>
<bean id="serviceAccessController" class="com.xiniunet.open.manager.ApiServiceAccessController"/>
<bean id="springContext" class="com.xiniunet.framework.util.SpringContext"/>
<!--<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">-->
<!-- <property name="maxTotal" value="8" />-->
<!-- <property name="testOnBorrow" value="true" />-->
<!--</bean>-->
<!--<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate">-->
<!-- <property name="connectionFactory" ref="jedisConnectionFactory"/>-->
<!-- <property name="defaultSerializer">-->
<!-- <bean class="org.springframework.data.redis.serializer.StringRedisSerializer"/>-->
<!-- </property>-->
<!--</bean>-->
<!--<bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" destroy-method="destroy">-->
<!-- <property name="poolConfig" ref="jedisPoolConfig"/>-->
<!-- <property name="hostName" value="${redis.host}"/>-->
<!-- <property name="port" value="${redis.port}"/>-->
<!-- <property name="password" value="${redis.password}"/>-->
<!-- <property name="timeout" value="15000"/>-->
<!-- <property name="usePool" value="true"/>-->
<!--</bean>-->
</beans>