xiayu 发表于 2017-12-20 16:12:17

学习Spring-Session+Redis实现session共享

<bean  class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration">
  <property name="maxInactiveIntervalInSeconds" value="600"/>
  </bean>
  <bean>
  <property name="maxTotal" value="100" />
  <property name="maxIdle" value="10" />
  </bean>
  <bean
  class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" destroy-method="destroy">
  <property name="hostName" value="${redis_hostname}"/>
  <property name="port" value="${redis_port}"/>
  <property name="password" value="${redis_pwd}" />
  <property name="timeout" value="3000"/>
  <property name="usePool" value="true"/>
  <property name="poolConfig" ref="jedisPoolConfig"/>
  </bean>
页: [1]
查看完整版本: 学习Spring-Session+Redis实现session共享