diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java
index d13475b96dfc96780faaae7b01275f717f8befbf..f66b7407e0fbede37c91e3d5f7f23d49ba1f7c2f 100644
--- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java
+++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java
@@ -23,7 +23,6 @@ public class RestfulJDBCTest {
connection.close();
}
-
/**
* 查询所有log.log
**/
diff --git a/tests/examples/JDBC/taosdemo/pom.xml b/tests/examples/JDBC/taosdemo/pom.xml
index d4797fa2fba2236c89550a7483b8809393dd642a..f63309962e67ab3ea80a341cfb0ee2df61d934c4 100644
--- a/tests/examples/JDBC/taosdemo/pom.xml
+++ b/tests/examples/JDBC/taosdemo/pom.xml
@@ -57,14 +57,6 @@
${spring.version}
-
-
- com.alibaba
- fastjson
- 1.2.75
-
-
-
com.zaxxer
@@ -77,6 +69,13 @@
taos-jdbcdriver
2.0.15
+
+
+ com.alibaba
+ fastjson
+ 1.2.75
+
+
mysql
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 0700675fa80c62f9cd44c61eb2a510fb0e7ab7d1..f6ae7b7ce8836ff2cb1ef885c3b35ac687b17ed6 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,7 +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 || 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 9f420b4eedc070806472e9ed47dcb18555e410c1..abd0fcf3a8d2280fba83f6d7964d26a063cd7f2b 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
@@ -28,7 +28,7 @@ public class DataSourceFactory {
else
config.setDriverClassName("com.taosdata.jdbc.TSDBDriver");
if ("com.taosdata.jdbc.rs.RestfulDriver".equalsIgnoreCase(properties.getProperty("jdbc.driver")))
- config.setJdbcUrl("jdbc:TAOS-RS://" + host + ":" + port + "/?charset=UTF-8&locale=en_US.UTF-8&timezone=UTC-8");
+ config.setJdbcUrl("jdbc:TAOS-RS://" + host + ":6041/?charset=UTF-8&locale=en_US.UTF-8&timezone=UTC-8");
else
config.setJdbcUrl("jdbc:TAOS://" + host + ":" + port + "/?charset=UTF-8&locale=en_US.UTF-8&timezone=UTC-8");
config.setUsername(user);
diff --git a/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/JdbcTaosdemoConfig.java b/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/JdbcTaosdemoConfig.java
index f9bd4bca28431739cc0a76caaf7bf17c0f12f62f..be19f1a2116ba5460bdae479ed147c0aacb6c32e 100644
--- a/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/JdbcTaosdemoConfig.java
+++ b/tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/JdbcTaosdemoConfig.java
@@ -4,7 +4,7 @@ import com.taosdata.taosdemo.utils.TimeStampUtil;
public final class JdbcTaosdemoConfig {
// instance
- public String host; //host
+ public String host = "master"; //host
public int port = 6030; //port
public String user = "root"; //user
public String password = "taosdata"; //password
diff --git a/tests/examples/JDBC/taosdemo/src/main/resources/application.properties b/tests/examples/JDBC/taosdemo/src/main/resources/application.properties
index 51d9b64ce986472539897b4df6da4f65f0981b4f..4ff3dad78c9d7f6b1b216ccf6447f82f04295024 100644
--- a/tests/examples/JDBC/taosdemo/src/main/resources/application.properties
+++ b/tests/examples/JDBC/taosdemo/src/main/resources/application.properties
@@ -7,14 +7,14 @@ spring.datasource.driver-class-name=com.taosdata.jdbc.TSDBDriver
spring.datasource.username=root
spring.datasource.password=taosdata
#spring.datasource.url=jdbc:TAOS-RS://:/?charset=UTF-8&locale=en_US.UTF-8&timezone=UTC-8
-#spring.datasource.driver-class-name=com.taosdata.jdbc.rs.RestfulDriver
+#spring.datasource.driver-class-name=com.taosdata.RestfulDriver
#spring.datasource.username=root
#spring.datasource.password=taosdata
#spring.datasource.hikari.maximum-pool-size=1
#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=1
hikari.minimum-idle=1
hikari.max-lifetime=0
\ No newline at end of file