This commit improves JDBC configuration by introducing `@SpringSessionDataSource` qualifier for explicitly declaring a `DataSource` to be used by Spring Session. This is in particular useful in scenarios with multiple `DataSource` beans present in the application context.
As a consequence, JDBC configuration is simplified and no longer registers a Spring Session specific `JdbcTemplate` bean.
Closes gh-863
This commit improves session cleanup handling in `JdbcOperationsSessionRepository#cleanUpExpiredSessions` by optimizing the used SQL statement. This is done by calculating the session expiry time when persisting the session, which in turn allows the cleanup SQL statement to be more index-friendly.
Closes gh-847
This commit improves dependency management with the following changes:
- `spring-session-core`: move `javax.servlet-api` from `provided` to `optional` configuration due to introduction of reactive support
- `spring-session-data-redis`: remove Redis driver from `compile` configuration
- Boot samples: delegate Redis driver choice to `spring-boot-starter-data-redis`
- polish `test` configuration dependencies
This commit provides implementation of SessionRepository based
on Spring's JdbcOperations interface.
@EnableJdbcHttpSession annotation is provided to ease the
configuration, together with spring-session-jdbc BOM and schema
creation scripts for all major databases.
Fixes gh-364