资源简介

tomcat8、8.5、9与redis实现session共享,并可以通过修改源码可自定义session键,访问地址:http://blog.csdn.net/fackyou200/article/details/78929008

资源截图

代码片段和文件信息

package com.orangefunction.tomcatredissessionmanager.exampleapp;

import com.google.gson.Gson;
import com.orangefunction.tomcat.redissessions.RedisSession;
import java.util.HashMap;
import java.util.Collections;
import spark.ResponseTransformerRoute;
import spark.Session;
import javax.servlet.http.HttpSession;

public abstract class JsonTransformerRoute extends ResponseTransformerRoute {

    private Gson gson = new Gson();

    protected JsonTransformerRoute(String path) {
      super(path);
    }

    protected JsonTransformerRoute(String path String acceptType) {
      super(path acceptType);
    }

    @Override
    public String render(object jsonobject) {
      return gson.toJson(jsonobject);
    }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-01-15 15:46  redis-tomcat\
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\
     文件         278  2017-02-05 23:26  redis-tomcat\redis-与8.0、8.5、9tomcat集群\context.xml
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\
     文件        5301  2016-09-26 11:37  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.classpath
     文件          91  2015-04-08 06:44  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.gitignore
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.gradle\
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.gradle\3.1\
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.gradle\3.1\taskArtifacts\
     文件          31  2016-09-26 11:37  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.gradle\3.1\taskArtifacts\cache.properties
     文件          17  2016-09-26 15:35  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.gradle\3.1\taskArtifacts\cache.properties.lock
     文件       20097  2016-09-26 15:35  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.gradle\3.1\taskArtifacts\fileHashes.bin
     文件       35582  2016-09-26 15:35  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.gradle\3.1\taskArtifacts\fileSnapshots.bin
     文件       26962  2016-09-26 15:35  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.gradle\3.1\taskArtifacts\taskArtifacts.bin
     文件         438  2016-09-26 11:37  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.project
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.settings\
     文件         632  2016-09-26 11:37  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\.settings\org.eclipse.jdt.core.prefs
     文件          70  2015-04-08 06:44  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\Gemfile
     文件         592  2015-04-08 06:44  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\Gemfile.lock
     文件       11057  2015-04-08 06:44  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\README.markdown
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\naritech\
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\naritech\nicole\
     目录           0  2018-01-15 15:46  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\naritech\nicole\gump\
     文件         649  2016-09-26 15:06  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\naritech\nicole\gump\DeserializedSessionContainer.class
     文件        4858  2016-09-26 11:39  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\naritech\nicole\gump\JavaSerializer.class
     文件        4341  2016-09-26 11:39  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\naritech\nicole\gump\RedisSession.class
     文件        1424  2016-09-26 11:39  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\naritech\nicole\gump\RedisSessionHandlerValve.class
     文件        2211  2016-09-26 15:06  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\naritech\nicole\gump\RedisSessionManager$SessionPersistPolicy.class
     文件       26358  2016-09-26 15:06  redis-tomcat\redis-与8.0、8.5、9tomcat集群\tomcat-redis-session-manager-master-8.0\bin\com\naritech\nicole\gump\RedisSessionManager.class
............此处省略376个文件信息

评论

共有 条评论