Skip to content
New issue

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

有个疑问,TokenStore的JDBC实现为什么要存java对象 #13

Open
fliaping opened this issue Jun 15, 2018 · 3 comments
Open

有个疑问,TokenStore的JDBC实现为什么要存java对象 #13

fliaping opened this issue Jun 15, 2018 · 3 comments

Comments

@fliaping
Copy link

我看JdbcTokenStore的实现是直接把java对象的字节存入数据库,不明白为什么这样搞,一个字段大了几倍-十几倍,不管是存储容量还是读写速度都会有影响的吧

@lexburner
Copy link
Owner

实际生产中没人会这么做的。

@fliaping
Copy link
Author

@lexburner 我看redisTokenStore也是直接序列化OAuth2AccessToken和OAuth2AccessToken对象,生产不这样用的话,那是怎么用呢?有没有什么示例?

@lexburner
Copy link
Owner

@fliaping java 的序列化性能不高,考虑用 hessian 之类的高效序列化方式会更好,这个是 spring-boot-data-redis 相关的配置,如果是的话替换下序列化器,不是很难,可以去研究下 spring-boot-data-redis 的配置。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants