import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
public class ScheduledService {
private static final Logger log = LoggerFactory.getLogger(ScheduledService.class);
/**
* 每天凌晨执行一次
*/
@Scheduled(cron = "0 0 0 * * ?")
public void scheduled(){
}
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/193308.html