Redis的sentinel使用及spring集成
Spring 配置:
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig"> <property name="maxTotal" value="200" /> <property name="maxIdle" value="30" /> <property name="maxWaitMillis" value="30000" /> <property name="testOnBorrow" value="false" /> <property name="testOnReturn" value="true" /> </bean> <bean id="jedisPool" class="redis.clients.jedis.JedisSentinelPool"> <constructor-arg index="0" value="mymaster" /> <constructor-arg index="1"> <set> <value>127.0.0.1:26379</value> <value>127.0.0.1:36379</value><!--配置了两个哨兵 --> </set> </constructor-arg> <constructor-arg index="2" ref="jedisPoolConfig" /> </bean> Jedis版本2.2.2以上
相关推荐
yupi0 2020-10-10
spring 2020-08-18
编程点滴 2020-07-29
幸运小侯子 2020-07-05
itjavashuai 2020-07-04
qingjiuquan 2020-06-29
shushan 2020-06-25
小鱿鱼 2020-06-22
咻pur慢 2020-06-18
melonjj 2020-06-17
qingjiuquan 2020-06-13
neweastsun 2020-06-05
小鱿鱼 2020-06-05
mxcsdn 2020-05-31
吾日五省我身 2020-05-27
牧场SZShepherd 2020-05-27
sweetgirl0 2020-05-14