From f9e5cb2005ddf1fa55e76a9a4eac9f8ec5b4a2f5 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Mon, 11 Jul 2022 10:44:35 +0900 Subject: [PATCH] config: config set --- .../xit/core/config/database/BaseMpowerDaoSupport.java | 10 +++++++--- src/main/resources/config/conf.yml | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/xit/core/config/database/BaseMpowerDaoSupport.java b/src/main/java/com/xit/core/config/database/BaseMpowerDaoSupport.java index 62ed65f..656bbb5 100644 --- a/src/main/java/com/xit/core/config/database/BaseMpowerDaoSupport.java +++ b/src/main/java/com/xit/core/config/database/BaseMpowerDaoSupport.java @@ -23,8 +23,12 @@ import java.util.*; public abstract class BaseMpowerDaoSupport { @Value("${mpower.dbName}") private String dbName; - private String hostip = "127.0.0.1"; - private int port = 9999; + + @Value("${mpower.hostIp}") + private String hostIp; + + @Value("${mpower.port}") + private int port; public void setDbName(String dbName){ this.dbName = dbName; @@ -343,7 +347,7 @@ public abstract class BaseMpowerDaoSupport { } private Client getConnection(){ - Client mpowerClient = new Client(hostip, port); + Client mpowerClient = new Client(hostIp, port); mpowerClient.setCryptEnable(false); try { mpowerClient.getConnection("MPowerXmlToQuery.xmlQuery1"); diff --git a/src/main/resources/config/conf.yml b/src/main/resources/config/conf.yml index 4fc092b..1f591b5 100644 --- a/src/main/resources/config/conf.yml +++ b/src/main/resources/config/conf.yml @@ -30,4 +30,6 @@ file: size: 10000000 mpower: + hostIp: 127.0.0.1 + port: 9999 dbName: gn