接口 SchedulingConfigurer
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
Optional interface to be implemented by
@Configuration classes annotated
with @EnableScheduling. Typically used for setting a specific
TaskScheduler bean to be used when
executing scheduled tasks or for registering scheduled tasks in a programmatic
fashion as opposed to the declarative approach of using the
@Scheduled annotation. For example, this may be necessary
when implementing Trigger-based
tasks, which are not supported by the @Scheduled annotation.
See @EnableScheduling for detailed usage examples.
- 从以下版本开始:
- 4.0
- 作者:
- Chris Beams
- 另请参阅:
-
方法概要
修饰符和类型方法说明voidconfigureTasks(ScheduledTaskRegistrar taskRegistrar) Callback allowing aTaskSchedulerand specificTaskinstances to be registered against the given theScheduledTaskRegistrar.
-
方法详细资料
-
configureTasks
Callback allowing aTaskSchedulerand specificTaskinstances to be registered against the given theScheduledTaskRegistrar.- 参数:
taskRegistrar- the registrar to be configured.
-