From 70b95a9bb5c51611833de2590e7e58357d52f568 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Thu, 21 Dec 2023 16:55:43 +0900 Subject: [PATCH] =?UTF-8?q?db=20=EC=82=AC=EC=9A=A9=EC=97=AC=EB=B6=80=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/interfaces/lntris/InterfaceConfig.java | 2 +- .../java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java | 2 +- .../java/cokr/xit/interfaces/lntris/InterfaceConfigTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/cokr/xit/interfaces/lntris/InterfaceConfig.java b/src/main/java/cokr/xit/interfaces/lntris/InterfaceConfig.java index bc8eeb6..cd356d9 100644 --- a/src/main/java/cokr/xit/interfaces/lntris/InterfaceConfig.java +++ b/src/main/java/cokr/xit/interfaces/lntris/InterfaceConfig.java @@ -80,7 +80,7 @@ public class InterfaceConfig extends AbstractComponent { this.remote = remote; } - public static boolean useDatabase() { + public static boolean databaseActive() { return conf.useDatabase; } diff --git a/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java b/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java index feee1aa..8add5b5 100644 --- a/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java +++ b/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java @@ -67,7 +67,7 @@ public abstract class InterfaceInfoReader> extends .read(path) .getMessages() .forEach(info -> { - insertInterfaceInfo().accept(info); + InterfaceConfig.databaseActive(() -> insertInterfaceInfo().accept(info)); List msgs = (List)status.get("messages"); if (msgs == null) status.set("messages", msgs = new ArrayList<>()); diff --git a/src/test/java/cokr/xit/interfaces/lntris/InterfaceConfigTest.java b/src/test/java/cokr/xit/interfaces/lntris/InterfaceConfigTest.java index 01e8040..aea094e 100644 --- a/src/test/java/cokr/xit/interfaces/lntris/InterfaceConfigTest.java +++ b/src/test/java/cokr/xit/interfaces/lntris/InterfaceConfigTest.java @@ -9,7 +9,7 @@ import cokr.xit.foundation.test.TestSupport; public class InterfaceConfigTest extends TestSupport { @Test void config() { - System.out.println("useDatabase: " + InterfaceConfig.useDatabase()); + System.out.println("useDatabase: " + InterfaceConfig.databaseActive()); InterfaceConfig.EndPoint remote = InterfaceConfig.remote(); System.out.println("========== remote =========="); System.out.println("organization: " + remote.getOrganization());