alexxiyang / shiro-redis

shiro only provide the support of ehcache and concurrentHashMap. Here is an implement of redis cache can be used by shiro. Hope it will help you!
MIT License
1.17k stars 446 forks source link

怎么更改session的过期时间? #126

Closed shudj closed 4 years ago

shudj commented 4 years ago

我是这样配置的,但是测试实现不了

shiro-redis: redis-manager: host: 127.0.0.1:6379 database: 0 session-dao: key-prefix: "wk:session:" session-in-memory-timeout: 3000 cache-manager: expire: 3000 principal-id-field-name: username

alexxiyang commented 4 years ago

session-in-memory-timeout 是TheardLocal中的session存活时间,可以保持默认配置。 session过期时间通过shiro-redis.session-dao.expire 设定,单位是秒。3000就是3000秒。如果是3秒请设定为 shiro-redis.session-dao.expire : 3