Spring Integration @Scheduled 用于带有7个字段和zone参数的cron表达式的替代方法。

huangapple go评论63阅读模式
英文:

Spring Integration @Scheduled alternative for cron expression with 7 fields and zone parameter

问题

@Scheduled不再接受7个字段。如果我需要cron表达式的年份字段,有哪些替代方法?我查看了Quartz的cron触发器使用7个字段,但不确定它是否适用于Spring Integration入站适配器?

英文:

@Scheduled doesn't take 7 fields anymore. What are the alternatives if I need the year field for the cron expression? I looked and saw Quartz cron trigger takes in 7 fields, but not sure if it'll work with spring integration inbound adapters?

答案1

得分: 0

你是对的:org.springframework.scheduling.support.CronTrigger 中没有年份字段支持。在 Spring Integration 的轮询器中也没有 Quartz 支持。但是你仍然可以配置 Quartz 调用你的方法来处理入站通道适配器并向通道产生消息。

更多信息请参阅这里:

https://docs.spring.io/spring-framework/reference/integration/scheduling.html#scheduling-quartz

https://github.com/spring-projects/spring-integration/issues/6705

英文:

You are right: there is no year field support in the org.springframework.scheduling.support.CronTrigger. And there is no Quartz support in Spring Integation's poller. However you still can configure a Quartz to call your method for inbound channel adapter and produce a message to the channel.

See more info here:

https://docs.spring.io/spring-framework/reference/integration/scheduling.html#scheduling-quartz

https://github.com/spring-projects/spring-integration/issues/6705

huangapple
  • 本文由 发表于 2023年5月22日 03:13:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76301524.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定