We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Bean(name = "sessionManager") public DefaultWebSessionManager sessionManager(){ DefaultWebSessionManager manager = new DefaultWebSessionManager(); //manager.setCacheManager(cacheManager);// 加入缓存管理器 manager.setSessionFactory(shiroSessionFactory());//设置sessionFactory manager.setSessionDAO(shiroSessionDao());// 设置SessionDao manager.setDeleteInvalidSessions(true);// 删除过期的session manager.setGlobalSessionTimeout(shiroSessionDao().getExpireTime());// 设置全局session超时 时间 manager.setSessionValidationSchedulerEnabled(true);// 是否定时检查session return manager; }
@Override protected Serializable doCreate(Session session) { Serializable sessionId = this.generateSessionId(session); assignSessionId(session,sessionId); Jedis jedis = null; try{ jedis = jedisPool.getResource(); //session由Redis缓存失效决定,这里作简单标识 session.setTimeout(expireTime); jedis.setex(prefix + sessionId, expireTime, SerializeUtils.serializaToString((ShiroSession) session)); logger.info("sessionId {} name {} 被创建", sessionId, session.getClass().getName()); }catch (Exception e){ logger.warn("创建session失败",e); }finally { jedis.close(); } return sessionId; }
The text was updated successfully, but these errors were encountered:
您可以提供一下RedisCache类给我看看吗
Sorry, something went wrong.
请问一下你们有实现单点的功能吗,我们现在想集成cas+shiro,但是前后端分离我们没有找到解决方案,不知道您这边有没有什么解决方案没有?还望赐教,感谢!
@alexpdh redis作为分布式缓存可以解决单点问题
@Zhouwt998 你指的是哪个类
No branches or pull requests
用户登录状态的保持和单点登录
挑战
解决方案
实现
优势
The text was updated successfully, but these errors were encountered: