Open BoykoAlex opened 2 months ago
@martinlippert likely we may have to give up on this for now as Spring Boot properties metadata has String
type for CRON expression and no other helpful metadata. Perhaps the default value if it parses to CronExpression
might be used to decide whether this is a CRON expression but it feels as a flaky criteria.
I have pushed some code to support cron parameter as a SPEL or Property Holder but i think this is as far as we can get for now without extra metadata for Cron expression type in the JSON there isn't much we can do. Furthermore, I have only seen CRON expression type value in one property in Spring Integration so far... Thus, it may not worth the effort.
Maybe good enough to hard-code the type of this property instead of defining new metadata for this type.
We can hard-code it, yes, but again there is only one such property that I found hence all the work for one property. We can even have settings for user to add more property keys that support cron expression. It just feels too much work for a little gain so far :-\ IntelliJ has no support for cron expressions in properties files... likely this feature does not have high demand...
Agree. Moving to backlog
Support syntax validation and possibly highlighting of CRON expressions values inside spring property files (properties/yaml)
spring.integration.poller.cron=0 /30 ?
Likely new CRON value type needs to be added for properties.
Other properties (info from the Spring Core team):
spring.session.redis.cleanup-cron
spring.session.jdbc.cleanup-cron
(See support for CRON in IntelliJ: https://www.jetbrains.com/help/idea/scheduled-tasks.html)