/
NikolayIvkin
/
tutorials1
Обзор
Документация
Войти
/
NikolayIvkin
/
tutorials1
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
spring-boot-modules/spring-boot-annotations/src/main/java/com/baeldung/annotations/Driver.java
32 строки
662 B
dupirefr
* Moved annotations articles to new spring-boot-annotations module
17 фев 2020, 09:25
17 фев 2020, 09:25
6cd76fb
Код
Авторство
О чём код?
package com.baeldung.annotations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Component public class Driver { @Autowired private Vehicle vehicle; @Autowired public Driver(Vehicle vehicle) { this.vehicle = vehicle; } @Autowired public void setVehicle(Vehicle vehicle) { this.vehicle = vehicle; } public Vehicle getVehicle() { return vehicle; } @Scheduled(fixedRate = 10000) @Scheduled(cron = "0 * * * * MON-FRI") public void checkVehicle() { } }