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