JedisSentinelPool的相关配置与操作
前面文章 《一步步实现redis+sentinel双机热备》 中已经分享了如何配置使用redis自带监听程序sentinel实现双机热备,这篇文章将继续分享,客户端程序需要做哪些调整。 Spring配置文件 <context:property-placeholder ignore-unresolvable="true" location="classpath:redis.properties" /> <bean id="poolConfig" class="redis.clients.jedis.JedisPoolConfig"> <property name="maxTotal" value="${redis.maxTotal}" /> <property name="minIdle" value="${redis.minIdle}" /> <property name="maxWaitMillis" value="${redis.maxWaitTime}" /> <property name="maxIdle" value="${redis.maxIdle}" /> <property name="testOnBorrow" value="${redis.testOnBorrow}" /> <property name="testOnReturn" value="true" /