java - 关于spring的remember me的使用的问题
巴扎黑
巴扎黑 2017-04-18 10:17:36
0
2
470

关于用户模块的设计遇到一些问题,这个remember me功能就是其中之一。
我目前的架构是使用spring-boot来开发,使用redis做缓存,把用户的登陆状态记录在redis里面。
但是如何去做这个remember me功能呢?spring-security提供了一个启用remember me的功能。对于这一点的使用《Spring in Action》只是提了一下而已,并没有详细的说明。我认为应该是使用的session来做的缓存。

但是我不知道怎么配置才能让springredis中查询用户的登陆状态。有什么办法能够做到吗?
如果不行的话,有没其他方案来实现remember me这个功能?

巴扎黑
巴扎黑

reply all(2)
洪涛

In the final analysis, it is all cache records. There are two differences between using the session and using the redis solution:
1. One uses the web server's cache, and the other uses a separate server cache, which involves two different operation and maintenance methods.
2. Use session to directly support object storage. Using redis requires another layer of conversion between the object and the data type of redis.

小葫芦

Save less data in the session. It would be great if spring has a second-level cache Ehcache and redis.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!