From 243d58d1fab31791b4885a951cf508d5c74b7680 Mon Sep 17 00:00:00 2001 From: zyyang Date: Tue, 5 Jan 2021 13:29:59 +0800 Subject: [PATCH] change --- tests/examples/JDBC/JDBCDemo/pom.xml | 4 ++-- tests/examples/JDBC/JDBCDemo/readme.md | 11 ++++------- .../taosdata/example/{JdbcDemo.java => JDBCDemo.java} | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) rename tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/{JdbcDemo.java => JDBCDemo.java} (98%) diff --git a/tests/examples/JDBC/JDBCDemo/pom.xml b/tests/examples/JDBC/JDBCDemo/pom.xml index bf748f17de..b2fdc1ab29 100644 --- a/tests/examples/JDBC/JDBCDemo/pom.xml +++ b/tests/examples/JDBC/JDBCDemo/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.taosdata.jdbc - jdbcChecker + JDBCDemo SNAPSHOT jar @@ -23,7 +23,7 @@ - com.taosdata.example.JdbcDemo + com.taosdata.example.JDBCDemo diff --git a/tests/examples/JDBC/JDBCDemo/readme.md b/tests/examples/JDBC/JDBCDemo/readme.md index e348e458fe..f0886e521b 100644 --- a/tests/examples/JDBC/JDBCDemo/readme.md +++ b/tests/examples/JDBC/JDBCDemo/readme.md @@ -1,4 +1,4 @@ -# How to Run the JDBC Demo Code On A Linux OS +# How to Run the JDBC Demo Code On Linux OS TDengine's JDBC demo project is organized in a Maven way so that users can easily compile, package and run the project. If you don't have Maven on your server, you may install it using
sudo apt-get install maven
@@ -6,14 +6,11 @@ TDengine's JDBC demo project is organized in a Maven way so that users can easil Make sure you have already installed a tdengine client on your current develop environment. Download the tdengine package on our website: ``https://www.taosdata.com/cn/all-downloads/`` and install the client. -## How to run jdbcChecker -
mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcChecker" -Dexec.args="-host localhost"
- -## How to run jdbcTaosDemo +## Run jdbcDemo using mvn plugin run command: -
 mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.jdbcTaosdemo.JdbcTaosdemo"
+
 mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcDemo"
and run with your customed args -
mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.jdbcTaosdemo.JdbcTaosdemo" -Dexec.args="-host localhost"
+
mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcDemo" -Dexec.args="-host [HOSTNAME]"
## Compile the Demo Code and Run It diff --git a/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JdbcDemo.java b/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java similarity index 98% rename from tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JdbcDemo.java rename to tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java index 31d5d55f92..821248d16b 100644 --- a/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JdbcDemo.java +++ b/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java @@ -5,7 +5,7 @@ import com.taosdata.jdbc.TSDBDriver; import java.sql.*; import java.util.Properties; -public class JdbcDemo { +public class JDBCDemo { private static String host; private static final String dbName = "test"; private static final String tbName = "weather"; @@ -22,7 +22,7 @@ public class JdbcDemo { return; } - JdbcDemo demo = new JdbcDemo(); + JDBCDemo demo = new JDBCDemo(); demo.init(); demo.createDatabase(); demo.useDatabase(); -- GitLab