# redis-session **Repository Path**: chenxin_gitee/redis-session ## Basic Information - **Project Name**: redis-session - **Description**: tomcat redis session - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2020-08-17 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # redis-session #### 介绍 tomcat redis session #### 使用说明 * JedisStore:复制redis-session-manager.jar、jedis-2.9.0.jar、commons-pool2-2.4.2.jar到tomcat/lib目录,server.xml配置如下 > #tomcat/conf/server.xml * RedisSessionManager:复制redis-session-manager.jar、jedis-2.9.0.jar、commons-pool2-2.4.2.jar到tomcat/lib目录,server.xml配置如下 > #tomcat/conf/server.xml * RedisSessionFilter:引入依赖com.xlongwei:redis-session:0.0.1,web.xml配置filter,可选在server.xml配置NoSessionManager > #WEB-INF/web.xml cookie配置:sessionCookieName、cookieDomain、cookieContextPath、cookieMaxAge redisSessionFilter com.xlongwei.session.RedisSessionFilter prefix sid: redisSessionFilter /* #tomcat/conf/server.xml #### 配置参数 > JedisPool连接池:minIdle、maxIdle、maxTotal、lifo、fairness、maxWaitMillis、minEvictableIdleTimeMillis、testOnCreate等 Redis单机:host主机、port端口、password密码、database数据库、timeout超时 Sentinel哨兵:sentinelMaster+hostAndPorts RedisCluster集群:hostAndPorts=host:port,host:port,host:port,host:port,host:port,host:port Redis存储配置:prefix前缀、maxInactiveInterval过期、saveOnDirty(默认true有修改时保存,false即时保存,用于RedisSessionManager) cookie配置:sessionCookieName、cookieDomain、cookieContextPath、cookieMaxAge,仅用于RedisSessionFilter