支持tomcat8.0,不支持tomcat8.5, 没有对tomcat7做测试
需要tomcat8.5支持的请移步 https://github.com/cc-chen/tomcat8.5-redis-session-manager
添加下面的配置到tomcat的context.xml中
<Valve className="com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve"/>
<Manager className="com.orangefunction.tomcat.redissessions.RedisSessionManager"
host="192.168.10.162"
port="6379"
database="0"
password="trj123456"
maxInactiveInterval="60" />
复制下面的文件到TOMCAT_BASE/lib目录:
- tomcat8-redis-session-manager.jar
- jedis-2.5.2.jar
- commons-pool2-2.2.jar
此版本修改自 https://github.com/jcoleman/tomcat-redis-session-manager