Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
09b58e7e
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
09b58e7e
编写于
7月 14, 2021
作者:
sangshuduo
提交者:
GitHub
7月 14, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-5259]<fix>: JDBC vulnerable packages. (#6858)
上级
80faa86c
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
50 addition
and
37 deletion
+50
-37
cmake/install.inc
cmake/install.inc
+1
-1
src/connector/jdbc/CMakeLists.txt
src/connector/jdbc/CMakeLists.txt
+2
-2
src/connector/jdbc/pom.xml
src/connector/jdbc/pom.xml
+3
-3
tests/comparisonTest/cassandra/cassandratest/pom.xml
tests/comparisonTest/cassandra/cassandratest/pom.xml
+1
-1
tests/comparisonTest/opentsdb/opentsdbtest/pom.xml
tests/comparisonTest/opentsdb/opentsdbtest/pom.xml
+2
-2
tests/examples/JDBC/SpringJdbcTemplate/pom.xml
tests/examples/JDBC/SpringJdbcTemplate/pom.xml
+1
-1
tests/examples/JDBC/connectionPools/pom.xml
tests/examples/JDBC/connectionPools/pom.xml
+9
-4
tests/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/ConnectionPoolDemo.java
...rc/main/java/com/taosdata/example/ConnectionPoolDemo.java
+3
-2
tests/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/common/InsertTask.java
...src/main/java/com/taosdata/example/common/InsertTask.java
+3
-2
tests/examples/JDBC/mybatisplus-demo/pom.xml
tests/examples/JDBC/mybatisplus-demo/pom.xml
+1
-1
tests/examples/JDBC/taosdemo/pom.xml
tests/examples/JDBC/taosdemo/pom.xml
+6
-6
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/TaosDemoApplication.java
.../main/java/com/taosdata/taosdemo/TaosDemoApplication.java
+3
-2
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/DatabaseMapperImpl.java
...in/java/com/taosdata/taosdemo/dao/DatabaseMapperImpl.java
+3
-2
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/SubTableMapperImpl.java
...in/java/com/taosdata/taosdemo/dao/SubTableMapperImpl.java
+3
-2
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/SuperTableMapperImpl.java
.../java/com/taosdata/taosdemo/dao/SuperTableMapperImpl.java
+3
-2
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/TableMapperImpl.java
.../main/java/com/taosdata/taosdemo/dao/TableMapperImpl.java
+3
-2
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/SubTableService.java
...n/java/com/taosdata/taosdemo/service/SubTableService.java
+3
-2
未找到文件。
cmake/install.inc
浏览文件 @
09b58e7e
...
...
@@ -32,7 +32,7 @@ ELSEIF (TD_WINDOWS)
#INSTALL(TARGETS taos RUNTIME DESTINATION driver)
#INSTALL(TARGETS shell RUNTIME DESTINATION .)
IF
(
TD_MVN_INSTALLED
)
INSTALL
(
FILES
$
{
LIBRARY_OUTPUT_PATH
}
/
taos
-
jdbcdriver
-
2.0.32
-
dist
.
jar
DESTINATION
connector
/
jdbc
)
INSTALL
(
FILES
$
{
LIBRARY_OUTPUT_PATH
}
/
taos
-
jdbcdriver
-
*
-
dist
.
jar
DESTINATION
connector
/
jdbc
)
ENDIF
()
ELSEIF
(
TD_DARWIN
)
SET
(
TD_MAKE_INSTALL_SH
"${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh"
)
...
...
src/connector/jdbc/CMakeLists.txt
浏览文件 @
09b58e7e
...
...
@@ -8,8 +8,8 @@ IF (TD_MVN_INSTALLED)
ADD_CUSTOM_COMMAND
(
OUTPUT
${
JDBC_CMD_NAME
}
POST_BUILD
COMMAND mvn -Dmaven.test.skip=true install -f
${
CMAKE_CURRENT_SOURCE_DIR
}
/pom.xml
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_CURRENT_SOURCE_DIR
}
/target/taos-jdbcdriver-
2.0.32
-dist.jar
${
LIBRARY_OUTPUT_PATH
}
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
CMAKE_CURRENT_SOURCE_DIR
}
/target/taos-jdbcdriver-
*
-dist.jar
${
LIBRARY_OUTPUT_PATH
}
COMMAND mvn -Dmaven.test.skip=true clean -f
${
CMAKE_CURRENT_SOURCE_DIR
}
/pom.xml
COMMENT
"build jdbc driver"
)
ADD_CUSTOM_TARGET
(
${
JDBC_TARGET_NAME
}
ALL WORKING_DIRECTORY
${
EXECUTABLE_OUTPUT_PATH
}
DEPENDS
${
JDBC_CMD_NAME
}
)
ENDIF
()
\ No newline at end of file
ENDIF
()
src/connector/jdbc/pom.xml
浏览文件 @
09b58e7e
...
...
@@ -3,7 +3,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.taosdata.jdbc
</groupId>
<artifactId>
taos-jdbcdriver
</artifactId>
<version>
2.0.3
2
</version>
<version>
2.0.3
3
</version>
<packaging>
jar
</packaging>
<name>
JDBCDriver
</name>
<url>
https://github.com/taosdata/TDengine/tree/master/src/connector/jdbc
</url>
...
...
@@ -40,7 +40,7 @@
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.13
</version>
<version>
4.13
.1
</version>
<scope>
test
</scope>
</dependency>
<!-- for restful -->
...
...
@@ -57,7 +57,7 @@
<dependency>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<version>
29
.0-jre
</version>
<version>
30
.0-jre
</version>
</dependency>
</dependencies>
...
...
tests/comparisonTest/cassandra/cassandratest/pom.xml
浏览文件 @
09b58e7e
...
...
@@ -75,7 +75,7 @@
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.11
</version>
<version>
4.1
3.
1
</version>
<scope>
test
</scope>
</dependency>
...
...
tests/comparisonTest/opentsdb/opentsdbtest/pom.xml
浏览文件 @
09b58e7e
...
...
@@ -87,14 +87,14 @@
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.11
</version>
<version>
4.1
3.
1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<version>
29
.0-jre
</version>
<version>
30
.0-jre
</version>
</dependency>
<dependency>
...
...
tests/examples/JDBC/SpringJdbcTemplate/pom.xml
浏览文件 @
09b58e7e
...
...
@@ -40,7 +40,7 @@
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.13
</version>
<version>
4.13
.1
</version>
<scope>
test
</scope>
</dependency>
...
...
tests/examples/JDBC/connectionPools/pom.xml
浏览文件 @
09b58e7e
...
...
@@ -4,6 +4,11 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<properties>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
</properties>
<groupId>
com.taosdata.demo
</groupId>
<artifactId>
connectionPools
</artifactId>
<version>
1.0-SNAPSHOT
</version>
...
...
@@ -46,9 +51,9 @@
</dependency>
<!-- log4j -->
<dependency>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
<version>
1.2.17
</version>
<groupId>
org.apache.logging.
log4j
</groupId>
<artifactId>
log4j
-core
</artifactId>
<version>
2.14.1
</version>
</dependency>
<!-- proxool -->
<dependency>
...
...
@@ -108,4 +113,4 @@
</plugins>
</build>
</project>
\ No newline at end of file
</project>
tests/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/ConnectionPoolDemo.java
浏览文件 @
09b58e7e
...
...
@@ -5,7 +5,8 @@ import com.taosdata.example.pool.C3p0Builder;
import
com.taosdata.example.pool.DbcpBuilder
;
import
com.taosdata.example.pool.DruidPoolBuilder
;
import
com.taosdata.example.pool.HikariCpBuilder
;
import
org.apache.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.LogManager
;
import
javax.sql.DataSource
;
import
java.sql.Connection
;
...
...
@@ -17,7 +18,7 @@ import java.util.concurrent.TimeUnit;
public
class
ConnectionPoolDemo
{
private
static
Logger
logger
=
Logger
.
getLogger
(
DruidPoolBuilder
.
class
);
private
static
Logger
logger
=
Log
Mana
ger
.
getLogger
(
DruidPoolBuilder
.
class
);
private
static
final
String
dbName
=
"pool_test"
;
private
static
String
poolType
=
"hikari"
;
...
...
tests/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/common/InsertTask.java
浏览文件 @
09b58e7e
package
com.taosdata.example.common
;
import
org.apache.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.LogManager
;
import
javax.sql.DataSource
;
import
java.sql.Connection
;
...
...
@@ -10,7 +11,7 @@ import java.util.Random;
public
class
InsertTask
implements
Runnable
{
private
final
Random
random
=
new
Random
(
System
.
currentTimeMillis
());
private
static
final
Logger
logger
=
Logger
.
getLogger
(
InsertTask
.
class
);
private
static
final
Logger
logger
=
Log
Mana
ger
.
getLogger
(
InsertTask
.
class
);
private
final
DataSource
ds
;
private
final
String
dbName
;
...
...
tests/examples/JDBC/mybatisplus-demo/pom.xml
浏览文件 @
09b58e7e
...
...
@@ -68,7 +68,7 @@
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.1
2
</version>
<version>
4.1
3.1
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
...
...
tests/examples/JDBC/taosdemo/pom.xml
浏览文件 @
09b58e7e
...
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.taosdata
</groupId>
<artifactId>
taosdemo
</artifactId>
<version>
2.0
</version>
<version>
2.0
.1
</version>
<name>
taosdemo
</name>
<packaging>
jar
</packaging>
<description>
Demo project for TDengine
</description>
...
...
@@ -81,20 +81,20 @@
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.47
</version>
<version>
8.0.16
</version>
<scope>
test
</scope>
</dependency>
<!-- log4j -->
<dependency>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
<version>
1.2.17
</version>
<groupId>
org.apache.logging.
log4j
</groupId>
<artifactId>
log4j
-core
</artifactId>
<version>
2.14.1
</version>
</dependency>
<!-- junit -->
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.1
2
</version>
<version>
4.1
3.1
</version>
<scope>
test
</scope>
</dependency>
<!-- lombok -->
...
...
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/TaosDemoApplication.java
浏览文件 @
09b58e7e
...
...
@@ -8,7 +8,8 @@ import com.taosdata.taosdemo.service.SqlExecuteTask;
import
com.taosdata.taosdemo.service.SubTableService
;
import
com.taosdata.taosdemo.service.SuperTableService
;
import
com.taosdata.taosdemo.service.data.SuperTableMetaGenerator
;
import
org.apache.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.LogManager
;
import
javax.sql.DataSource
;
import
java.io.IOException
;
...
...
@@ -20,7 +21,7 @@ import java.util.Map;
public
class
TaosDemoApplication
{
private
static
final
Logger
logger
=
Logger
.
getLogger
(
TaosDemoApplication
.
class
);
private
static
final
Logger
logger
=
Log
Mana
ger
.
getLogger
(
TaosDemoApplication
.
class
);
public
static
void
main
(
String
[]
args
)
throws
IOException
{
// 读配置参数
...
...
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/DatabaseMapperImpl.java
浏览文件 @
09b58e7e
package
com.taosdata.taosdemo.dao
;
import
com.taosdata.taosdemo.utils.SqlSpeller
;
import
org.apache.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
javax.sql.DataSource
;
import
java.util.Map
;
public
class
DatabaseMapperImpl
implements
DatabaseMapper
{
private
static
final
Logger
logger
=
Logger
.
getLogger
(
DatabaseMapperImpl
.
class
);
private
static
final
Logger
logger
=
Log
Mana
ger
.
getLogger
(
DatabaseMapperImpl
.
class
);
private
final
JdbcTemplate
jdbcTemplate
;
...
...
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/SubTableMapperImpl.java
浏览文件 @
09b58e7e
...
...
@@ -3,7 +3,8 @@ package com.taosdata.taosdemo.dao;
import
com.taosdata.taosdemo.domain.SubTableMeta
;
import
com.taosdata.taosdemo.domain.SubTableValue
;
import
com.taosdata.taosdemo.utils.SqlSpeller
;
import
org.apache.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
javax.sql.DataSource
;
...
...
@@ -11,7 +12,7 @@ import java.util.List;
public
class
SubTableMapperImpl
implements
SubTableMapper
{
private
static
final
Logger
logger
=
Logger
.
getLogger
(
SubTableMapperImpl
.
class
);
private
static
final
Logger
logger
=
Log
Mana
ger
.
getLogger
(
SubTableMapperImpl
.
class
);
private
final
JdbcTemplate
jdbcTemplate
;
public
SubTableMapperImpl
(
DataSource
dataSource
)
{
...
...
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/SuperTableMapperImpl.java
浏览文件 @
09b58e7e
...
...
@@ -2,13 +2,14 @@ package com.taosdata.taosdemo.dao;
import
com.taosdata.taosdemo.domain.SuperTableMeta
;
import
com.taosdata.taosdemo.utils.SqlSpeller
;
import
org.apache.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
javax.sql.DataSource
;
public
class
SuperTableMapperImpl
implements
SuperTableMapper
{
private
static
final
Logger
logger
=
Logger
.
getLogger
(
SuperTableMapperImpl
.
class
);
private
static
final
Logger
logger
=
Log
Mana
ger
.
getLogger
(
SuperTableMapperImpl
.
class
);
private
JdbcTemplate
jdbcTemplate
;
public
SuperTableMapperImpl
(
DataSource
dataSource
)
{
...
...
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/TableMapperImpl.java
浏览文件 @
09b58e7e
...
...
@@ -3,13 +3,14 @@ package com.taosdata.taosdemo.dao;
import
com.taosdata.taosdemo.domain.TableMeta
;
import
com.taosdata.taosdemo.domain.TableValue
;
import
com.taosdata.taosdemo.utils.SqlSpeller
;
import
org.apache.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
java.util.List
;
public
class
TableMapperImpl
implements
TableMapper
{
private
static
final
Logger
logger
=
Logger
.
getLogger
(
TableMapperImpl
.
class
);
private
static
final
Logger
logger
=
Log
Mana
ger
.
getLogger
(
TableMapperImpl
.
class
);
private
JdbcTemplate
template
;
@Override
...
...
tests/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/SubTableService.java
浏览文件 @
09b58e7e
...
...
@@ -8,7 +8,8 @@ import com.taosdata.taosdemo.domain.SubTableValue;
import
com.taosdata.taosdemo.domain.SuperTableMeta
;
import
com.taosdata.taosdemo.service.data.SubTableMetaGenerator
;
import
com.taosdata.taosdemo.service.data.SubTableValueGenerator
;
import
org.apache.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.LogManager
;
import
javax.sql.DataSource
;
import
java.util.ArrayList
;
...
...
@@ -20,7 +21,7 @@ import java.util.stream.IntStream;
public
class
SubTableService
extends
AbstractService
{
private
SubTableMapper
mapper
;
private
static
final
Logger
logger
=
Logger
.
getLogger
(
SubTableService
.
class
);
private
static
final
Logger
logger
=
Log
Mana
ger
.
getLogger
(
SubTableService
.
class
);
public
SubTableService
(
DataSource
datasource
)
{
this
.
mapper
=
new
SubTableMapperImpl
(
datasource
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录