接口 SchedulingConfigurer

  • 函数接口:
    这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

    @FunctionalInterface
    public interface SchedulingConfigurer
    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.

    从以下版本开始:
    3.1
    作者:
    Chris Beams
    另请参阅:
    EnableScheduling, ScheduledTaskRegistrar