spring-redis.xml
2.57 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"
default-autowire="byName">
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
<!-- <property name="maxActive" value="1000" /> -->
<property name="maxIdle" value="500" />
<!-- <property name="maxWait" value="1000" /> -->
<property name="testOnBorrow" value="true" />
</bean>
<bean id="jedis.shardInfo1" class="redis.clients.jedis.JedisShardInfo">
<constructor-arg index="0" value="${project.redis.host1}" />
<constructor-arg index="1" value="${project.redis.port1}" />
</bean>
<bean id="shardedJedisPool" class="redis.clients.jedis.ShardedJedisPool">
<constructor-arg index="0" ref="jedisPoolConfig" />
<constructor-arg index="1">
<list>
<ref bean="jedis.shardInfo1" />
</list>
</constructor-arg>
</bean>
<bean id="redisUtil" class="com.diligrp.website.util.redis.impl.RedisUtilImpl">
<property name="shardedJedisPool" ref="shardedJedisPool" />
<property name="keyRule" value="dili_redis_" />
</bean>
<bean id="userRedisUtil" class="com.diligrp.mobsite.getway.rpc.utils.UserRedisUtil">
<property name="shardedJedisPool" ref="shardedJedisPool" />
<property name="keyRule" value="DILIGRP_USER_" />
</bean>
<!-- <bean id="manageRedisUtil" class="com.diligrp.website.util.redis.impl.RedisUtilImpl"> -->
<!-- <property name="shardedJedisPool" ref="shardedJedisPool" /> -->
<!-- </bean> -->
<!--<bean id="betterRedisUtil" class="com.diligrp.manage.sdk.sessionRedis.BetterRedisUtil">-->
<!--<bean id="manageRedisUtil" class="com.diligrp.website.util.redis.impl.RedisUtilImpl">-->
<!--<property name="shardedJedisPool" ref="shardedJedisPool" />-->
<!--<!– <property name="keyRule" value="DILI_MANAGE_SESSION_" /> –>-->
<!--<!– <property name="keyRule" value="(.*)+" /> –>-->
<!--</bean>-->
<bean id="myRedisUtil" class="com.diligrp.manage.sdk.sessionRedis.MyRedisUtilSession">
<constructor-arg name="shardedJedisPool" ref="shardedJedisPool"/>
</bean>
</beans>