提交 1e578c39 编写于 作者: Z zyyang

change

上级 118f1ac1
......@@ -23,7 +23,6 @@ public class RestfulJDBCTest {
connection.close();
}
/**
* 查询所有log.log
**/
......
......@@ -57,14 +57,6 @@
<version>${spring.version}</version>
</dependency>
<!-- fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.75</version>
</dependency>
<!-- HikariCP -->
<dependency>
<groupId>com.zaxxer</groupId>
......@@ -77,6 +69,13 @@
<artifactId>taos-jdbcdriver</artifactId>
<version>2.0.15</version>
</dependency>
<!-- fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.75</version>
</dependency>
<!-- mysql -->
<dependency>
<groupId>mysql</groupId>
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册