<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                參考文獻: https://www.cnblogs.com/cgli/p/7920573.html 要點: 同一個應用在運行多個tomcat實例的時候,經常需要共享Session。tomcat配置共享session有多種方式 1、利用tomcat自身集群特性進行配置; 2、利用Memcache第三方緩存進行配置; 3、利用Redis第三方緩存進行配置; 使用方法3,重點在于tomcat 8.x 因為tomcat7還有點不同,tomcat7的配置可以利用一個開源組件,直接配置即可以使用,比較簡單方便(直接參考這個文章即可:http://blog.csdn.net/qq584852076/article/details/46502185)。 tomcat8卻是有不同的,開源組件明確說是不支持的。如果要使用tomcat8, 要對源碼做簡單修改。 開源組件在這里: https://github.com/jcoleman/tomcat-redis-session-manager 分步指南 1. 下載開源項目 https://github.com/jcoleman/tomcat-redis-session-manager 2. 支持tomcat8需修改代碼 修改RedisSessionManager類中的initializeSerializer()方法 ~~~ /* if (getContainer() != null) { loader = getContainer().getLoader(); }*/ Context context = this.getContext(); if(context !=null) { loader = context.getLoader(); } ~~~ 3. 打包部署 將源碼打成jar包,取名redistomcat8.jar 將redistomcat8, 以及以下依賴包拷貝到tomcat的lib下。 ![](https://box.kancloud.cn/a85986443b2918e0b70d0c7644bb0c63_230x89.png) 4. 新增tomcat context.xml配置 ~~~ <Valve className="com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve" /> <Manager className="com.orangefunction.tomcat.redissessions.RedisSessionManager" host="r-wz97b7d28a98aa44.redis.rds.aliyuncs.com" port="6379" database="0" password="xxxxxxx" maxInactiveInterval="60" /> ~~~ 同時如果應用下的WEB-INF/lib有相同的jar去掉 重啟tomcat服務即可
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看