I am working with a Spring boot application where the session is persisted in Redis.

As of now for a Spring boot application, session-id is getting generated by invoking new MapSession() from RedisIndexedSessionRepository#createSession of spring-session framework.

I would like to override this createSession function so that I can instantiate MapSession with a pre-specified id like new MapSession(myCustomSessionId).

Regarding this, I am not getting any idea how to do this from Spring boot application. I have posted a question regarding this in SO as well: https://stackoverflow.com/questions/62897170/how-to-instantiate-org-springframework-session-mapsession-in-my-spring-boot-appl?noredirect=1#comment111245637_62897170, but still got no concrete idea how to do this.

Comment From: wilkinsona

I don't think there's anything Spring Boot-specific about this, so I'm afraid this isn't the right place to ask. Also, as mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Stack Overflow (where you've already asked) is a better place for this sort of question. You may also want to see if someone in the Spring Session Gitter channel can help.