How to Schedule a Task in Spring

preview_player
Показать описание
Two simple steps to schedule a task in Spring:

1. Annotation
@Scheduled(fixedRate = 5000)
public void showCurrentTime() {
}

2.

@SpringBootApplication
@EnableScheduling
public class Application {

public static void main(String[] args) throws Exception {
}
}
Рекомендации по теме