From 9449b5f71bd0c20ed9aefd025ee87c69bcdfbd40 Mon Sep 17 00:00:00 2001
From: zhaowenxuan <chacca165@163.com>
Date: 星期三, 18 十二月 2024 14:51:12 +0800
Subject: [PATCH] 20241218

---
 src/main/java/com/example/scheudleds/DictSync.java |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/example/scheudleds/DictSync.java b/src/main/java/com/example/scheudleds/DictSync.java
index 96f1800..5de19a9 100644
--- a/src/main/java/com/example/scheudleds/DictSync.java
+++ b/src/main/java/com/example/scheudleds/DictSync.java
@@ -1,6 +1,7 @@
 package com.example.scheudleds;
 
 import com.example.utils.DictionaryUtil;
+import com.example.utils.DictionaryUtilNew;
 import lombok.extern.slf4j.Slf4j;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -9,6 +10,7 @@
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import java.io.FileWriter;
 import java.io.IOException;
 
 @Slf4j
@@ -17,17 +19,26 @@
 public class DictSync {
     @Autowired
     private DictionaryUtil dictionaryUtil;
+    @Autowired
+    private DictionaryUtilNew dictionaryUtilNew;
 
     /**
      * 瀛楀吀鍚屾
      */
     @Scheduled(cron = "0 0 22 * * ? ")
     public void execDict(){
+        FileWriter fileWriter = null;
         try {
-            dictionaryUtil.exec1();
-        } catch (IOException e) {
-            log.error("瀹氭椂浠诲姟寮傚父");
-            e.printStackTrace();
-        }
+            fileWriter = new FileWriter("src/main/resources/log.log");
+            fileWriter.write("");
+            fileWriter.close();
+        } catch (IOException ignored) {}
+//        try {
+//            dictionaryUtil.exec1();
+//        } catch (IOException e) {
+//            log.error("瀹氭椂浠诲姟寮傚父");
+//            e.printStackTrace();
+//        }
+        dictionaryUtilNew.exec1();
     }
 }

--
Gitblit v1.8.0