Tomcat7 Redis Session共享

1.环境
服务器 centos7
tomcat 7
redis
nginx
2.配置tomcat配置文件context.xml
<Valve className="com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve" />
<Manager className="com.orangefunction.tomcat.redissessions.RedisSessionManager"
host="192.168.0.1"
port="2241"
password="123456"
database="6"
maxInactiveInterval="60" />
3.tomcat lib添加jar包
commons-pool2-2.2.jar
jedis-2.5.2.jar
tomcat-redis-session-manage-tomcat7.jar
下载链接:https://pan.baidu.com/s/1pMfMmQv 密码:k8kf
4.测试
80端口提交
8081端口访问
8082端口访问
posted @ 2018-01-15 14:51  陶海军  阅读(148)  评论(0编辑  收藏  举报