Add support for configuring Spring Session cleanup cron

This commit adds support for configuring cron expression used for
expired session cleanup job in Redis and JDBC session stores.

Closes gh-10818
This commit is contained in:
Vedran Pavic
2017-10-30 10:08:20 +01:00
committed by Stephane Nicoll
parent f59986f100
commit 3d44ef0872
7 changed files with 71 additions and 10 deletions

View File

@@ -425,6 +425,7 @@ content into your application; rather pick only the properties that you need.
spring.session.hazelcast.map-name=spring:session:sessions # Name of the map used to store sessions.
# SPRING SESSION JDBC ({sc-spring-boot-autoconfigure}/session/JdbcSessionProperties.{sc-ext}[JdbcSessionProperties])
spring.session.jdbc.cleanup-cron=0 * * * * * # Cron expression for expired session cleanup job.
spring.session.jdbc.initialize-schema=embedded # Database schema initialization mode.
spring.session.jdbc.schema=classpath:org/springframework/session/jdbc/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
spring.session.jdbc.table-name=SPRING_SESSION # Name of database table used to store sessions.
@@ -433,6 +434,7 @@ content into your application; rather pick only the properties that you need.
spring.session.mongodb.collection-name=sessions # Collection name used to store sessions.
# SPRING SESSION REDIS ({sc-spring-boot-autoconfigure}/session/RedisSessionProperties.{sc-ext}[RedisSessionProperties])
spring.session.redis.cleanup-cron=0 * * * * * # Cron expression for expired session cleanup job.
spring.session.redis.flush-mode=on-save # Sessions flush mode.
spring.session.redis.namespace= # Namespace for keys used to store sessions.