使用Spring @scheduled在服务器中

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

我正在使用@scheduled在服务器中使用以下任务计划任务

 @Scheduled(fixedRate = 1000)

但是任务没有被调用,因为客户端在服务器中每隔两秒触发一次其他功能。如何强制服务器也触发计划的任务(顺序无关紧要)

spring client-server scheduled-tasks spring-scheduled
1个回答
0
投票

也许您忘记了在配置中使用@EnableScheduling注释。

© www.soinside.com 2019 - 2024. All rights reserved.