-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to disable cleanup cron #1159
Comments
I will try to make a pull request in a way as described above. |
Rather than adding a new annotation attribute, we could look into direction of introducing a special value for current |
…d JDBC backend)
…on property (Redis and JDBC backend)
…d JDBC backend)
…on property (Redis and JDBC backend)
Closing in favor of PR #1160. |
Hi, I want a way to disable cleanup cron in Spring Session Data Redis (as described in previous conversation: #1119 (comment) ).
Here is a issue that describes about the matter.
TL;DR
cleanup-cron=0 0 5 31 2
(February 31st, never comes), but it does not work with recent version of spring-contextRedisHttpSessionConfiguration
andJdbcHttpSessionConfiguration
to prevent cleanup cron.cleanupCron
attribute.Motivation
I want to disable cleanup cron because ...
Limitation of current implementation
As shown in example code of #1119 (comment), current
RedisHttpSessionConfiguration
andJdbcHttpSessionConfiguration
does not formal way to disable cleanup cron.My understanding is that above example code is a only way currently and such way is poor in maintainability.
What I want
My proposal is to add following attributes to disable cleanup cron:
boolean enableCleanupCron = true
optional attribute into@EnableRedisHttpSession
and@EnableJdbcHttpSession
true
, it is same with existing behaviorfalse
,RedisHttpSessionConfiguration
andJdbcHttpSessionConfiguration
will not register CronTaskdisableCleanupCron
andcleanupCron
attributesStringValueResolver
to resolve placeholders seems to be a way to resolve placeholders (current implementation uses it onredisNamespace
attribute but not oncleanupCron
).cleanupCron
attribute seems to accept only cron form (e.g.0 0 5 31 2
). Thus introducing StringValueResolver is not breaking change in my understanding.The text was updated successfully, but these errors were encountered: