Browse Source

110举报投诉

master
laishajiang 2 years ago
parent
commit
6975ff2853
  1. 22
      mailbox-lan/src/main/java/com/biutag/lan/service/DataSyncScheduler.java

22
mailbox-lan/src/main/java/com/biutag/lan/service/DataSyncScheduler.java

@ -3,14 +3,14 @@ package com.biutag.lan.service;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
public class DataSyncScheduler {
private final ReportService dataSourceService;
public DataSyncScheduler(ReportService dataSourceService) {
this.dataSourceService = dataSourceService;
}
@Scheduled(fixedRate = 60 * 60 * 1000) // 每5分钟执行一次
public void syncDataSourcesPeriodically() {
dataSourceService.syncData();
}
}
//@Component
//public class DataSyncScheduler {
// private final ReportService dataSourceService;
// public DataSyncScheduler(ReportService dataSourceService) {
// this.dataSourceService = dataSourceService;
// }
// @Scheduled(fixedRate = 60 * 60 * 1000) // 每5分钟执行一次
// public void syncDataSourcesPeriodically() {
// dataSourceService.syncData();
// }
//}

Loading…
Cancel
Save