0

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?

yglodt
  • 13,807
  • 14
  • 91
  • 127
  • I think the answer is yes. But you should edit your question do you mean how to configure spring-session or do you want to know if you can use your custom schema... – joshiste Apr 29 '16 at 06:51

1 Answers1

-1

The answer is:

Yes, it is possible, like the documentation of the newly released Spring Session 1.2.0 states:

http://docs.spring.io/spring-session/docs/current/reference/html5/guides/httpsession-jdbc-boot.html#httpsession-jdbc-boot-configuration

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.

yglodt
  • 13,807
  • 14
  • 91
  • 127