为什么我的 Cron 作业在遵循标准配置后不工作?

问题描述 投票:0回答:0

我有以下代码快照:

@SpringBootApplication
@EnableConfigurationProperties({ LiquibaseProperties.class, ApplicationProperties.class })
@EnableScheduling
public class MyApp { ...}

@Component
public class MyCronJobService {

  ...
    @Scheduled(cron = "0 0 * * * *")
    public void reminderCheck(){ ...}
}

就是Spring调度任务教程中展示的配置。但这些调度任务永远不会发生在 JHipster 应用程序中。为什么?

spring-boot jhipster
© www.soinside.com 2019 - 2024. All rights reserved.