spring session项目中如何修改或自定义sessionId? [英] How to modify or custom sessionId in spring session project?

查看:72
本文介绍了spring session项目中如何修改或自定义sessionId?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目使用Spring Boot和Spring Session,现在我想在redis中持久化会话数据之前修改或自定义sessionId,我该怎么办?谢谢!

My project use Spring Boot and Spring Session,now i want to modify or custom sessionId before session data persistence in redis,How should I do? thanks!

推荐答案

也许你需要阅读文档 Spring Session 与 spring boot 配合良好

Maybe you need to go through the docs Spring Session works well with spring boot

文档:http://docs.spring.io/spring-session/docs/current/reference/html5/

它会告诉您,将自定义实现与 @EnableSpringHttpSession 支持相结合,可以轻松重用现有的 Spring Session 配置工具和基础设施.

It will tell you that coupling the custom implementation with @EnableSpringHttpSession support allow to easily reuse existing Spring Session configuration facilities and infrastructure.

第十章10.自定义 SessionRepository 会告诉你想要什么.

The tenth chapter 10. Custom SessionRepository will tell what you want.

这篇关于spring session项目中如何修改或自定义sessionId?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆