Skip to content

Commit

Permalink
更新redis配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
micyo202 committed Mar 20, 2018
1 parent cfce5b6 commit a8ba9e7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions yan-web/src/main/resources/spring/config/spring-redis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

<!-- 配置 redis -->
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
<property name="maxTotal" value="100"/>
<property name="maxIdle" value="10"/>
<property name="maxWaitMillis" value="10000"/>
<property name="testOnBorrow" value="true"/>
<property name="maxTotal" value="${redis.maxTotal}"/>
<property name="maxIdle" value="${redis.maxIdle}"/>
<property name="maxWaitMillis" value="${redis.maxWaitMillis}"/>
<property name="testOnBorrow" value="${redis.testOnBorrow}"/>
</bean>

<bean id="jedisConnectionFactory"
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" destroy-method="destroy">
<property name="hostName" value="192.168.0.200"/>
<property name="port" value="6379"/>
<property name="password" value="root"/>
<property name="usePool" value="true"/>
<property name="hostName" value="${redis.hostName}"/>
<property name="port" value="${redis.port}"/>
<property name="password" value="${redis.password}"/>
<property name="usePool" value="${redis.usePool}"/>
<property name="poolConfig" ref="jedisPoolConfig"/>
</bean>

Expand All @@ -27,7 +27,7 @@
<!-- 将 session 放入 redis 中 -->
<bean id="redisHttpSessionConfiguration"
class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration">
<property name="maxInactiveIntervalInSeconds" value="600"/>
<property name="maxInactiveIntervalInSeconds" value="${redis.maxInactiveIntervalInSeconds}"/>
</bean>

</beans>

0 comments on commit a8ba9e7

Please sign in to comment.