From 1eafa4de4abae5aafe470d1f301f3060a83ab0f8 Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期一, 01 七月 2024 14:10:24 +0800 Subject: [PATCH] his同步字典实体类 --- src/main/java/com/example/scheudleds/DictSync.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/example/scheudleds/DictSync.java b/src/main/java/com/example/scheudleds/DictSync.java index 96f1800..8666ce9 100644 --- a/src/main/java/com/example/scheudleds/DictSync.java +++ b/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) { -- Gitblit v1.8.0