首页 > 学院 > 开发设计 > 正文

redis集群共享session配置

2019-11-08 03:21:21
字体:
来源:转载
供稿:网友

单点配置

<Context>

   <WatchedResource>WEB-INF/web.xml</WatchedResource>

   <ValveclassName="com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve"/>

   <Manager className="com.orangefunction.tomcat.redissessions.RedisSessionManager"

        host="192.168.254.10"

        port="6379"

        database="0"

         maxInactiveInterval="60"/>

</Context>

 

基于redis的集群配置如下:

<ValveclassName="com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve"/>        

<ManagerclassName="com.orangefunction.tomcat.redissessions.RedisSessionManager" 

    maxInactiveInterval="60"

    sentinelMaster="mymaster"

    sentinels="127.0.0.1:26379,127.0.0.1:26380,127.0.0.1:26381,127.0.0.1:26382"/>


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表