I am a newbie in spring-boot and i want to configure my spring session with jdbc using h2 database, but it does not create a database and table in my h2 embedded database, it creates it in the PostgreSQL, using the PostgreSQL data source i configured in my applications properties file. How do i make my spring app use my embedded h2 db for storing sessions only while not conflicting with the PostgreSQL data source for my JPA
https://github.com/eshiett1995/SessionProject. i would love if someone could help me with the session
check https://github.com/nomanbplmp/CustomSessionStoreExample to see complete example.
In order to make session store work with other than primary database it is required to provide custom session repository and override spring's internal as given below.