filmov
tv
How to Schedule a Task in Spring
Показать описание
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 {
}
}
1. Annotation
@Scheduled(fixedRate = 5000)
public void showCurrentTime() {
}
2.
@SpringBootApplication
@EnableScheduling
public class Application {
public static void main(String[] args) throws Exception {
}
}