提交 777337b2 编写于 作者: D dingbo

enh: remove useless perperties from java sample code

上级 6725baf8
package com.taos.example; package com.taos.example;
import com.taosdata.jdbc.TSDBDriver;
import java.sql.Connection; import java.sql.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Properties;
public class RESTConnectExample { public class RESTConnectExample {
// ANCHOR: main // ANCHOR: main
public static void main(String[] args) throws SQLException { public static void main(String[] args) throws SQLException {
String jdbcUrl = "jdbc:TAOS-RS://localhost:6041?user=root&password=taosdata"; String jdbcUrl = "jdbc:TAOS-RS://localhost:6041?user=root&password=taosdata";
Properties connProps = new Properties(); Connection conn = DriverManager.getConnection(jdbcUrl);
connProps.setProperty(TSDBDriver.PROPERTY_KEY_TIME_ZONE, "UTC-8");
Connection conn = DriverManager.getConnection(jdbcUrl, connProps);
System.out.println("Connected"); System.out.println("Connected");
conn.close(); conn.close();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册