diff --git a/jndc_client/pom.xml b/jndc_client/pom.xml
index bb0db52..199c256 100644
--- a/jndc_client/pom.xml
+++ b/jndc_client/pom.xml
@@ -25,6 +25,11 @@
jfoenix
8.0.10
+
+
+ commons-io
+ commons-io
+
diff --git a/jndc_client/src/main/java/jndc_client/start/ClientStart.java b/jndc_client/src/main/java/jndc_client/start/ClientStart.java
index 6ffdc69..1e8595c 100644
--- a/jndc_client/src/main/java/jndc_client/start/ClientStart.java
+++ b/jndc_client/src/main/java/jndc_client/start/ClientStart.java
@@ -6,6 +6,7 @@
import jndc_client.core.JNDCClient;
import jndc_client.core.JNDCClientConfig;
import jndc_client.http_support.ClientHttpManagement;
+import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -58,12 +59,18 @@ public static void main(String[] args) {
JNDCClientConfig jndcClientConfig = null;
try {
jndcClientConfig = ymlParser.parseFile(file, JNDCClientConfig.class);
+ if (jndcClientConfig == null) {
+ String configContent = FileUtils.readFileToString(file, "utf-8");
+ logger.error("please check the content:\n=====content_start=====\n" + configContent + "\n=====content_end=====\n on config.yml" + file);
+ ApplicationExit.exit();
+ }
jndcClientConfig.performParameterVerification();
jndcClientConfig.setRuntimeDir(file.getParent());
jndcClientConfig.loadClientId();
logger.info(tag + CLIENT_ID);
logger.info("client time out--->" + jndcClientConfig.getAutoReleaseTimeOut());
} catch (Exception e) {
+ e.printStackTrace();
logger.error("parse config file:" + file + "fail" + e);
ApplicationExit.exit();
}
diff --git a/jndc_server/pom.xml b/jndc_server/pom.xml
index e0c1a54..c77f761 100644
--- a/jndc_server/pom.xml
+++ b/jndc_server/pom.xml
@@ -27,7 +27,6 @@
commons-io
commons-io
- 2.8.0
diff --git a/jndc_server/src/main/java/jndc_server/start/ServerStart.java b/jndc_server/src/main/java/jndc_server/start/ServerStart.java
index 3dee275..b91dccf 100644
--- a/jndc_server/src/main/java/jndc_server/start/ServerStart.java
+++ b/jndc_server/src/main/java/jndc_server/start/ServerStart.java
@@ -5,6 +5,7 @@
import jndc.utils.YmlParser;
import jndc_server.core.JNDCServer;
import jndc_server.core.JNDCServerConfig;
+import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -61,6 +62,11 @@ public static void main(String[] args) {
JNDCServerConfig jndcServerConfig = null;
try {
jndcServerConfig = ymlParser.parseFile(file, JNDCServerConfig.class);
+ if (jndcServerConfig == null) {
+ String configContent = FileUtils.readFileToString(file, "utf-8");
+ logger.error("please check the content:\n=====content_start=====\n" + configContent + "\n=====content_end=====\n on config.yml" + file);
+ ApplicationExit.exit();
+ }
jndcServerConfig.setRuntimeDir(file.getParent());
jndcServerConfig.performParameterVerification();
jndcServerConfig.lazyInitAfterVerification();
diff --git a/pom.xml b/pom.xml
index 49803f8..5a24397 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,6 +22,16 @@
8
+
+
+
+ commons-io
+ commons-io
+ 2.8.0
+
+
+
+
@@ -44,6 +54,8 @@
1.18.16
provided
+
+