添加了几个redis库实例

This commit is contained in:
RenKaiGe-Office
2018-06-08 11:00:18 +08:00
parent 92611bff69
commit cc2657560b
2 changed files with 71 additions and 2 deletions

View File

@@ -60,6 +60,22 @@
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
p:host-name="${redis.host}" p:port="${redis.port}" p:pool-config-ref="poolConfig"
p:database="6" />
<bean id="connectionFactory7"
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
p:host-name="${redis.host}" p:port="${redis.port}" p:pool-config-ref="poolConfig"
p:database="7" />
<bean id="connectionFactory8"
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
p:host-name="${redis.host}" p:port="${redis.port}" p:pool-config-ref="poolConfig"
p:database="8" />
<bean id="connectionFactory9"
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
p:host-name="${redis.host}" p:port="${redis.port}" p:pool-config-ref="poolConfig"
p:database="9" />
<bean id="connectionFactory10"
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
p:host-name="${redis.host}" p:port="${redis.port}" p:pool-config-ref="poolConfig"
p:database="10" />
<bean id="connectionFactory15"
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
@@ -152,6 +168,59 @@
<!-- 设置开启事务 -->
<property name="enableTransactionSupport" value="true" />
</bean>
<bean id="redisTemplate7" class="org.springframework.data.redis.core.RedisTemplate">
<property name="connectionFactory" ref="connectionFactory7" />
<!-- 设置key和value的序列化方式,默认使用的是JdkSerializationRedisSerializer,key会被序列化为\xac\xed\x00\x056\x00 -->
<property name="keySerializer" ref="stringRedisSerializer" />
<property name="valueSerializer" ref="stringRedisSerializer" />
<property name="hashKeySerializer" ref="stringRedisSerializer" />
<property name="hashValueSerializer" ref="stringRedisSerializer" />
<!-- 设置开启事务 -->
<property name="enableTransactionSupport" value="true" />
</bean>
<bean id="redisTemplate8" class="org.springframework.data.redis.core.RedisTemplate">
<property name="connectionFactory" ref="connectionFactory8" />
<!-- 设置key和value的序列化方式,默认使用的是JdkSerializationRedisSerializer,key会被序列化为\xac\xed\x00\x056\x00 -->
<property name="keySerializer" ref="stringRedisSerializer" />
<property name="valueSerializer" ref="stringRedisSerializer" />
<property name="hashKeySerializer" ref="stringRedisSerializer" />
<property name="hashValueSerializer" ref="stringRedisSerializer" />
<!-- 设置开启事务 -->
<property name="enableTransactionSupport" value="true" />
</bean>
<bean id="redisTemplate9" class="org.springframework.data.redis.core.RedisTemplate">
<property name="connectionFactory" ref="connectionFactory9" />
<!-- 设置key和value的序列化方式,默认使用的是JdkSerializationRedisSerializer,key会被序列化为\xac\xed\x00\x056\x00 -->
<property name="keySerializer" ref="stringRedisSerializer" />
<property name="valueSerializer" ref="stringRedisSerializer" />
<property name="hashKeySerializer" ref="stringRedisSerializer" />
<property name="hashValueSerializer" ref="stringRedisSerializer" />
<!-- 设置开启事务 -->
<property name="enableTransactionSupport" value="true" />
</bean>
<bean id="redisTemplate10" class="org.springframework.data.redis.core.RedisTemplate">
<property name="connectionFactory" ref="connectionFactory10" />
<!-- 设置key和value的序列化方式,默认使用的是JdkSerializationRedisSerializer,key会被序列化为\xac\xed\x00\x056\x00 -->
<property name="keySerializer" ref="stringRedisSerializer" />
<property name="valueSerializer" ref="stringRedisSerializer" />
<property name="hashKeySerializer" ref="stringRedisSerializer" />
<property name="hashValueSerializer" ref="stringRedisSerializer" />
<!-- 设置开启事务 -->
<property name="enableTransactionSupport" value="true" />
</bean>
<bean id="redisTemplate15" class="org.springframework.data.redis.core.RedisTemplate">
<property name="connectionFactory" ref="connectionFactory15" />
<!-- 设置key和value的序列化方式,默认使用的是JdkSerializationRedisSerializer,key会被序列化为\xac\xed\x00\x056\x00 -->

View File

@@ -245,7 +245,7 @@ digest.gen.tool.path=maat-redis/digest_gen
##redis中有多少个数据库
maxRedisDBIndex=6
#redis中有多少个数据库(需要加1,代码中用的小于不是小于等于)
maxRedisDBIndex=12
##存放编译,分组,域配置id关系的redis数据库编号
idRelaRedisDBIndex=15