На основе преобразования http://javatoscala.com/ вот код, возможно, вам стоит его попробовать.
package hello
import java.text.SimpleDateFormat
import java.util.Date
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.scheduling.annotation.Scheduled
import org.springframework.stereotype.Component
import ScheduledTasks._
//remove if not needed
import scala.collection.JavaConversions._
object ScheduledTasks {
private val log: Logger = LoggerFactory.getLogger(classOf[ScheduledTasks])
private val dateFormat: SimpleDateFormat = new SimpleDateFormat("HH:mm:ss")
}
@Component
class ScheduledTasks {
@Scheduled(fixedRate = 5000)
def reportCurrentTime(): Unit = {
log.info("The time is now {}", dateFormat.format(new Date()))
}
}