路泰机电科技体检——数据平台后端
zhaowenxuan
2024-07-01 73fc90bf957d2cbcf392206e2937c0df059e7adb
src/main/java/com/example/scheudleds/DictSync.java
@@ -9,6 +9,7 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.io.FileWriter;
import java.io.IOException;
@Slf4j
@@ -23,6 +24,12 @@
     */
    @Scheduled(cron = "0 0 22 * * ? ")
    public void execDict(){
        FileWriter fileWriter = null;
        try {
            fileWriter = new FileWriter("src/main/resources/log.log");
            fileWriter.write("");
            fileWriter.close();
        } catch (IOException ignored) {}
        try {
            dictionaryUtil.exec1();
        } catch (IOException e) {