Привет, Ребят. Подскажите, как сделать, чтобы планировщик запустился и начал работу (Kotlin+Spring)?
@EnableScheduling
class ScheduledTasks {
private val dateFormat = SimpleDateFormat("HH:mm:ss")
@Scheduled(fixedRate = 5000)
fun reportCurrentTime() {
println("The time is now " + dateFormat.format(Date()))
}
}
ServiceApplication:
@SpringBootApplication
@EnableWebFlux
class ServiceApplication
fun main(args: Array<String>) {
runApplication<ServiceApplication>(*args)
}
Пробовал перенести @EnableScheduling в ServiceApplication, но результата не дало(