In my spring-boot application I have an existing dataSource, which I use for Hibernate
and/or JdbcTemplate
.
I am planning to use spring-session
with spring-session-jdbc
in the future.
Can the already existing and configured dataSource of the application be used?
If yes, how?
Or do I need to configure an additional dataSource for spring-session-jdbc
?
The answer is:
Yes, it is possible, like the documentation of the newly released Spring Session 1.2.0 states:
It also works without Spring Boot
. In an old Spring-MVC project based on xml-config, which does not use Spring Boot
, the configured dataSource
is automatically used by Spring Session
.