Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Spring中使用@scheduled注释的多个cron表达式?_Spring_Spring Mvc - Fatal编程技术网

在Spring中使用@scheduled注释的多个cron表达式?

在Spring中使用@scheduled注释的多个cron表达式?,spring,spring-mvc,Spring,Spring Mvc,我想在每个月的最后一天触发一个方法。 我用的是弹簧 @scheduled annotation @Scheduled(cron = "${attendance.cron.schedule}") 如何让Spring在不同的计划时间执行 我不能用0 15 10 L* 您已经开始使用占位符${attention.cron.schedule}。因此,我相信您只需要将attention.cron.schedule外部化到您的属性文件中,您就可以进行设置了 对于Spring,您可能最终会使用它。 如果您

我想在每个月的最后一天触发一个方法。 我用的是弹簧

@scheduled annotation  @Scheduled(cron = "${attendance.cron.schedule}")
如何让Spring在不同的计划时间执行


我不能用0 15 10 L*

您已经开始使用占位符${attention.cron.schedule}。因此,我相信您只需要将attention.cron.schedule外部化到您的属性文件中,您就可以进行设置了

对于Spring,您可能最终会使用它。
如果您已经使用Spring Boot,它提供了很多选项。

您需要在运行时更改它,还是在重新加载上下文后更改它?感谢您在重新加载上下文时的响应