Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
1e578c39
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1e578c39
编写于
12月 22, 2020
作者:
Z
zyyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change
上级
118f1ac1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
13 addition
and
14 deletion
+13
-14
src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java
...c/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java
+0
-1
tests/examples/JDBC/taosdemo/pom.xml
tests/examples/JDBC/taosdemo/pom.xml
+7
-8
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/TaosDemoApplication.java
.../main/java/com/taosdata/taosdemo/TaosDemoApplication.java
+2
-1
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/DataSourceFactory.java
...a/com/taosdata/taosdemo/components/DataSourceFactory.java
+1
-1
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/JdbcTaosdemoConfig.java
.../com/taosdata/taosdemo/components/JdbcTaosdemoConfig.java
+1
-1
tests/examples/JDBC/taosdemo/src/main/resources/application.properties
...s/JDBC/taosdemo/src/main/resources/application.properties
+2
-2
未找到文件。
src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java
浏览文件 @
1e578c39
...
...
@@ -23,7 +23,6 @@ public class RestfulJDBCTest {
connection
.
close
();
}
/**
* 查询所有log.log
**/
...
...
tests/examples/JDBC/taosdemo/pom.xml
浏览文件 @
1e578c39
...
...
@@ -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>
...
...
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/TaosDemoApplication.java
浏览文件 @
1e578c39
...
...
@@ -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
);
}
...
...
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/DataSourceFactory.java
浏览文件 @
1e578c39
...
...
@@ -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
);
...
...
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/JdbcTaosdemoConfig.java
浏览文件 @
1e578c39
...
...
@@ -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
...
...
tests/examples/JDBC/taosdemo/src/main/resources/application.properties
浏览文件 @
1e578c39
...
...
@@ -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.
TSDB
Driver
jdbc.driver
=
com.taosdata.jdbc.
rs.Restful
Driver
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录