I am developing springboot-springsession-jdbc-demo
. When I simply run the code I get the following error. It looks to me some property must need to set in app
I'm not sure this is the best solution (or even the solution as i'm new to spring and am not aware of the repercussions of doing this) but I was having the same issue, managed to solve it by deleting the annotation @EnableJdbcHttpSession
According to Vedran Pavic:
The reason spring.session.* do not work for you is because your are using @EnableJdbcHttpSession. That means that you are configuring Spring Session explicitly, so Spring Boot backs off with its auto-configuration.
You should remove @EnableJdbcHttpSession and ensure Spring Boot is auto-configuring Spring Session. Additionally, you could also leave spring.session.store-type out, since Spring Boot should be able to deduce which session repository implementation are you using as long as you have only only SessionRepository implementation on the classpath (i.e. you depend only on spring-session-jdbc and no other Spring Session modules).
Original Post
This will solve your immediate problem, but i'm unsure if it will break something else...