In a Spring Boot 3.2 application I want to choose which session store is being used, depending on active profiles.
In older Spring Boot versions there was a property to set:
spring.session.store-type=jdbc
So if you want to use redis instead, just override this value in the depending profile properties.
However, this property is no longer available. Since I can't think that Spring Boot creators wants to make life harder for us developers, I'm wondering what the current way to go is.
Spring Session by default has now an order for choosing a specific implementation when there are more than one session implementations available.
My question is: How can I tell Spring Boot which session management to use depending on an active profile?
You can try to provide the configuration explicitly. Something like this: