Is it possible to use Spring Boot session without Redis?

Fabio picture Fabio · Oct 28, 2015 · Viewed 9.7k times · Source

Looking at the Spring Boot docs I only found examples to use session with Redis, Is it possible to use it without Redis?

Answer

Adrian Shum picture Adrian Shum · Oct 28, 2015

As said in another answer: Yes, you can change the Session persistence backend by changing the SessionRepository implementation.

And, there is an built-in alternatives provided by Spring-Session, which is MapSessionRepository for which you can save session in a Map.

In the samples of Spring Session, there is a sample using Hazelcast as persistence backend. It is utilizing the above-mentioned MapSessionRepository with the Map instance created by Hazelcast.