Skip to content

Commit

Permalink
更新redis配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
micyo202 committed Mar 24, 2018
1 parent ccfced2 commit f110219
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion yan-web/src/main/resources/spring/config/spring-redis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,22 @@

<!-- 配置 redis -->
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
<property name="maxTotal" value="${redis.maxTotal}"/>
<!-- 最大空闲数 -->
<property name="maxIdle" value="${redis.maxIdle}"/>
<!-- 连接池的最大数据库连接数 -->
<property name="maxTotal" value="${redis.maxTotal}"/>
<!-- 最大建立连接等待时间 -->
<property name="maxWaitMillis" value="${redis.maxWaitMillis}"/>
<!-- 逐出连接的最小空闲时间 默认1800000毫秒(30分钟) -->
<property name="minEvictableIdleTimeMillis" value="${redis.minEvictableIdleTimeMillis}"/>
<!-- 每次逐出检查时 逐出的最大数目 如果为负数就是 : 1/abs(n), 默认3 -->
<property name="numTestsPerEvictionRun" value="${redis.numTestsPerEvictionRun}"/>
<!-- 逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1 -->
<property name="timeBetweenEvictionRunsMillis" value="${redis.timeBetweenEvictionRunsMillis}"/>
<!-- 是否在从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个 -->
<property name="testOnBorrow" value="${redis.testOnBorrow}"/>
<!-- 在空闲时检查有效性, 默认false -->
<property name="testWhileIdle" value="${redis.testWhileIdle}"/>
</bean>

<bean id="jedisConnectionFactory"
Expand Down

0 comments on commit f110219

Please sign in to comment.