@Component
@EnableScheduling
public class ScheduledTest {
@Scheduled(cron = "0/5 * * * * *")
public void test(){
System.out.println("test");
}
}
使用Spring框架做定时任务
最新推荐文章于 2024-07-19 15:53:52 发布
@Component
@EnableScheduling
public class ScheduledTest {
@Scheduled(cron = "0/5 * * * * *")
public void test(){
System.out.println("test");
}
}