db 사용여부 관련 수정

master
mjkhan21 11 months ago
parent f3215b84f0
commit 70b95a9bb5

@ -80,7 +80,7 @@ public class InterfaceConfig extends AbstractComponent {
this.remote = remote;
}
public static boolean useDatabase() {
public static boolean databaseActive() {
return conf.useDatabase;
}

@ -67,7 +67,7 @@ public abstract class InterfaceInfoReader<T extends InterfaceInfo<?, ?>> extends
.read(path)
.getMessages()
.forEach(info -> {
insertInterfaceInfo().accept(info);
InterfaceConfig.databaseActive(() -> insertInterfaceInfo().accept(info));
List<T> msgs = (List<T>)status.get("messages");
if (msgs == null)
status.set("messages", msgs = new ArrayList<>());

@ -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());

Loading…
Cancel
Save