summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <default@DESKTOP-7FEGRP2>2018-11-23 11:43:06 +0800
committerdefault <default@DESKTOP-7FEGRP2>2018-11-23 11:43:06 +0800
commite61cf4796d18a12514eda7e4dd7422e182735ab0 (patch)
tree5173d0bb41e59f7cfad107b83b481e2cd4c5b214
parent41a3e036cb28c1a1e557b613d759f2492bcf784a (diff)
update
-rw-r--r--nms_sync/bin/db.properties6
-rw-r--r--nms_sync/conf/db.properties6
-rw-r--r--nms_sync/src/com/nms/main/Conn.java4
-rw-r--r--nms_sync/src/com/nms/main/SyncData.java4
4 files changed, 14 insertions, 6 deletions
diff --git a/nms_sync/bin/db.properties b/nms_sync/bin/db.properties
index 84039a1..7758680 100644
--- a/nms_sync/bin/db.properties
+++ b/nms_sync/bin/db.properties
@@ -15,5 +15,9 @@ dbMaxActive=6
dbMinIdle=1
#\u6700\u5927\u7b49\u5f85\u8fde\u63a5\u65f6\u95f4
dbMaxWait=60000
+#\u8fde\u63a5\u6c60\u81ea\u52a8\u5173\u95ed\u8fde\u63a5\u662f\u5426\u5f00\u542f
+dbRemoveAbandoned=false
#\u8fde\u63a5\u6c60\u81ea\u52a8\u5173\u95ed\u8fde\u63a5\u65f6\u95f4
-dbRemoveAbandonedTimeout=1800 \ No newline at end of file
+dbRemoveAbandonedTimeout=1800
+#\u662f\u5426\u5f00\u542fsql\u8f93\u51fa
+dbShowSql=true \ No newline at end of file
diff --git a/nms_sync/conf/db.properties b/nms_sync/conf/db.properties
index 84039a1..7758680 100644
--- a/nms_sync/conf/db.properties
+++ b/nms_sync/conf/db.properties
@@ -15,5 +15,9 @@ dbMaxActive=6
dbMinIdle=1
#\u6700\u5927\u7b49\u5f85\u8fde\u63a5\u65f6\u95f4
dbMaxWait=60000
+#\u8fde\u63a5\u6c60\u81ea\u52a8\u5173\u95ed\u8fde\u63a5\u662f\u5426\u5f00\u542f
+dbRemoveAbandoned=false
#\u8fde\u63a5\u6c60\u81ea\u52a8\u5173\u95ed\u8fde\u63a5\u65f6\u95f4
-dbRemoveAbandonedTimeout=1800 \ No newline at end of file
+dbRemoveAbandonedTimeout=1800
+#\u662f\u5426\u5f00\u542fsql\u8f93\u51fa
+dbShowSql=true \ No newline at end of file
diff --git a/nms_sync/src/com/nms/main/Conn.java b/nms_sync/src/com/nms/main/Conn.java
index 66bc9f4..80793c9 100644
--- a/nms_sync/src/com/nms/main/Conn.java
+++ b/nms_sync/src/com/nms/main/Conn.java
@@ -30,10 +30,10 @@ public class Conn {
druid.setMaxActive(Integer.valueOf(PropKit.get("dbMaxActive")));
druid.setMinIdle(Integer.valueOf(PropKit.get("dbMinIdle")));
druid.setMaxWait(Integer.valueOf(PropKit.get("dbMaxWait")));
- druid.setRemoveAbandoned(true);
+ druid.setRemoveAbandoned(Boolean.valueOf(PropKit.get("dbRemoveAbandoned")));
druid.setRemoveAbandonedTimeoutMillis(Integer.valueOf(PropKit.get("dbRemoveAbandonedTimeout")));
ActiveRecordPlugin arp=new ActiveRecordPlugin(url,druid);
- arp.setShowSql(true);
+ arp.setShowSql(Boolean.valueOf(PropKit.get("dbShowSql")));
druid.start();
arp.start();
}
diff --git a/nms_sync/src/com/nms/main/SyncData.java b/nms_sync/src/com/nms/main/SyncData.java
index cc24cea..a722153 100644
--- a/nms_sync/src/com/nms/main/SyncData.java
+++ b/nms_sync/src/com/nms/main/SyncData.java
@@ -49,10 +49,10 @@ public class SyncData{
masterDruid.setMaxActive(Integer.valueOf(PropKit.get("dbMaxActive")));
masterDruid.setMinIdle(Integer.valueOf(PropKit.get("dbMinIdle")));
masterDruid.setMaxWait(Integer.valueOf(PropKit.get("dbMaxWait")));
- masterDruid.setRemoveAbandoned(true);
+ masterDruid.setRemoveAbandoned(Boolean.valueOf(PropKit.get("dbRemoveAbandoned")));
masterDruid.setRemoveAbandonedTimeoutMillis(Integer.valueOf(PropKit.get("dbRemoveAbandonedTimeout")));
ActiveRecordPlugin masterArp=new ActiveRecordPlugin("masterDataSource",masterDruid);
- masterArp.setShowSql(true);
+ masterArp.setShowSql(Boolean.valueOf(PropKit.get("dbShowSql")));
masterDruid.start();
masterArp.start();
logger.info("加载配置文件 设置当前同步 masterDataSource 完成");