接口 SchedulingConfigurer
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface SchedulingConfigurer
Optional interface to be implemented by @Configuration
classes annotated with @EnableScheduling
. Typically used for setting a specificTaskScheduler
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 implementingTrigger
-based tasks, which are not supported by the@Scheduled
annotation.See @
EnableScheduling
for detailed usage examples.- 从以下版本开始:
- 3.1
- 作者:
- Chris Beams
- 另请参阅:
EnableScheduling
,ScheduledTaskRegistrar
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
configureTasks(ScheduledTaskRegistrar taskRegistrar)
Callback allowing aTaskScheduler
and specificTask
instances to be registered against the given theScheduledTaskRegistrar
.
方法详细资料
configureTasks
void configureTasks(ScheduledTaskRegistrar taskRegistrar)
Callback allowing aTaskScheduler
and specificTask
instances to be registered against the given theScheduledTaskRegistrar
.- 参数:
taskRegistrar
- the registrar to be configured.