Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Shiro 作为权限控制框架, 现在因要拓展多服务分布式 ,要求使用 Mysql 作为Seesion 存储解决方案 , 网上90%都是Redis , 关于Mysql的很少而且大多都是错误的, 恳请各位大佬给个思路 , 谢谢~~~


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
376 views
Welcome To Ask or Share your Answers For Others

1 Answer

在MySQL中创建一张表,主要包含下面的3个字段

cookie,user_id

用户登录后设置一个cookie
在拦截器中获取浏览器器中的cookie,通过cookie查询表,查询不到user_id,重定向到登录界面


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...