diff --git a/tests/examples/JDBC/taosdemo/pom.xml b/tests/examples/JDBC/taosdemo/pom.xml
index 9b19ad9fb40873d5b0755cab043acd216647285d..64ffbc06b74b0da5a4d552403f1c600cbebb2842 100644
--- a/tests/examples/JDBC/taosdemo/pom.xml
+++ b/tests/examples/JDBC/taosdemo/pom.xml
@@ -68,6 +68,8 @@
com.taosdata.jdbc
taos-jdbcdriver
2.0.15
+ system
+ ${project.basedir}/src/main/resources/lib/taos-jdbcdriver-2.0.15.jar
@@ -75,12 +77,12 @@
fastjson
1.2.75
-
-
+
mysql
mysql-connector-java
5.1.47
+ test
@@ -111,6 +113,7 @@
**/*.properties
**/*.xml
+ **/*.jar
true
diff --git a/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/TaosDemoApplication.java b/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/TaosDemoApplication.java
index 200b17ec0651d5a6551815cbdb87165622c58157..b3c609bd0aa88770d4c34bb54d7ef9b2e5b62d2f 100644
--- a/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/TaosDemoApplication.java
+++ b/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/TaosDemoApplication.java
@@ -25,8 +25,8 @@ public class TaosDemoApplication {
// 读配置参数
JdbcTaosdemoConfig config = new JdbcTaosdemoConfig(args);
boolean isHelp = Arrays.asList(args).contains("--help");
-// if (isHelp || config.host == null || config.host.isEmpty()) {
- if (isHelp) {
+ if (isHelp || config.host == null || config.host.isEmpty()) {
+// if (isHelp) {
JdbcTaosdemoConfig.printHelp();
System.exit(0);
}
diff --git a/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/DataSourceFactory.java b/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/DataSourceFactory.java
index abd0fcf3a8d2280fba83f6d7964d26a063cd7f2b..c96d6f8bed68e9bb67d959ddb1d7531b4cbadeb3 100644
--- a/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/DataSourceFactory.java
+++ b/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/DataSourceFactory.java
@@ -23,10 +23,19 @@ public class DataSourceFactory {
properties.load(is);
HikariConfig config = new HikariConfig();
- if (properties.containsKey("jdbc.driver"))
+
+ if (properties.containsKey("jdbc.driver")) {
+// String driverName = properties.getProperty("jdbc.driver");
+// System.out.println(">>> load driver : " + driverName);
+// try {
+// Class.forName(driverName);
+// } catch (ClassNotFoundException e) {
+// e.printStackTrace();
+// }
config.setDriverClassName(properties.getProperty("jdbc.driver"));
- else
+ } else {
config.setDriverClassName("com.taosdata.jdbc.TSDBDriver");
+ }
if ("com.taosdata.jdbc.rs.RestfulDriver".equalsIgnoreCase(properties.getProperty("jdbc.driver")))
config.setJdbcUrl("jdbc:TAOS-RS://" + host + ":6041/?charset=UTF-8&locale=en_US.UTF-8&timezone=UTC-8");
else
diff --git a/tests/examples/JDBC/taosdemo/src/main/resources/application.properties b/tests/examples/JDBC/taosdemo/src/main/resources/application.properties
index c85824d9979d2be77b0b1e14ed9eefa83c5919b7..aaa80b9f88dbda337214772bcbf668478f512823 100644
--- a/tests/examples/JDBC/taosdemo/src/main/resources/application.properties
+++ b/tests/examples/JDBC/taosdemo/src/main/resources/application.properties
@@ -14,7 +14,8 @@ spring.datasource.password=taosdata
#spring.datasource.hikari.minimum-idle=1
#spring.datasource.hikari.max-lifetime=0
#logging.level.com.taosdata.taosdemo.dao=error
-jdbc.driver=com.taosdata.jdbc.TSDBDriver
+
+jdbc.driver=com.taosdata.jdbc.rs.RestfulDriver
hikari.maximum-pool-size=500
hikari.minimum-idle=100
hikari.max-lifetime=0
\ No newline at end of file