Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
batching-ck
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
java-ms
batching-ck
Commits
8ead8389
Commit
8ead8389
authored
Aug 03, 2023
by
王燊荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 将依赖带入jar包.业务端自行排除
parent
9dbb59cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
17 deletions
+37
-17
README.md
README.md
+27
-11
pom.xml
pom.xml
+10
-6
No files found.
README.md
View file @
8ead8389
...
...
@@ -2,9 +2,9 @@
[
TAPD文档
](
https://www.tapd.cn/37799108/markdown_wikis/show/#1137799108001002671
)
### (一) 注意事项
#### 1. 必须引入Mybatis-Plus
#### 2. !!#ff0000 不可使用!! yandex.clickhouse 相关yml 和驱动 .若有!!#ff0000 需移除!!,并更换为com.clickhouse
#### 1. 不可使用yandex.clickhouse 相关yml 和驱动 .若有相关配置必须先移除
> dynamic-db-yandex-clickhouse-vault.yml ==> ru.yandex.clickhouse.ClickHouseDriver
```
xml
<dependency>
<groupId>
ru.yandex.clickhouse
</groupId>
...
...
@@ -12,13 +12,27 @@
</dependency>
```
#### 3. 使用 com.clickhouse 相关yml 和驱动
>dynamic-db-clickhouse-vault.yml ==> com.clickhouse.jdbc.ClickHouseDriver
使用 dynamic-db-clickhouse-vault.yml
### 2. 包内已存在一些依赖.若有冲突需自行排除
>org.apache.commons commons-lang3 - 3.7
```
xml
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.7
</version>
</dependency>
```
>com.clickhouse clickhouse-jdbc - 0.4.6
```
xml
<dependency>
<!-- please stop using ru.yandex.clickhouse as it's been deprecated -->
<groupId>
com.clickhouse
</groupId>
<artifactId>
clickhouse-jdbc
</artifactId>
<version>
0.4.6
</version>
<version>
0.4.6
</version>
<!-- use uber jar with all dependencies included, change classifier to http for smaller jar -->
<classifier>
all
</classifier>
<exclusions>
<exclusion>
...
...
@@ -28,20 +42,22 @@
</exclusions>
</dependency>
```
#### 4. 时间类型字段 设置 NULL 会写入 1970-01-01 08:00:00 (ClickHouse DateTime 的默认值)
### (二) 使用步骤
>com.baomidou mybatis-plus-boot-starter - 3.5.1
####1. 引入Maven包
Mybatis-Plus !!#ff0000 必须!!
```
xml
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
建议 3.5.1 以上
</version>
<version>
3.5.1
</version>
</dependency>
```
batching-ck
#### 3. 时间类型字段 设置 NULL 会写入 1970-01-01 08:00:00 (ClickHouse DateTime 的默认值)
### (二) 使用步骤
####1. 引入Maven包
```
xml
<dependency>
<groupId>
com.afanticar
</groupId>
...
...
pom.xml
View file @
8ead8389
...
...
@@ -5,7 +5,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.afanticar
</groupId>
<artifactId>
batching-ck
</artifactId>
<version>
1.0.
1
</version>
<version>
1.0.
0
</version>
<packaging>
jar
</packaging>
<properties>
...
...
@@ -16,14 +16,14 @@
<java.version>
1.8
</java.version>
<mybatisplus.version>
3.5.1
</mybatisplus.version>
<clickhouse.jdbc.version>
0.4.6
</clickhouse.jdbc.version>
<commons-lang3.version>
3.7
</commons-lang3.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.7
</version>
<optional>
true
</optional>
<version>
${commons-lang3.version}
</version>
</dependency>
<dependency>
...
...
@@ -31,7 +31,6 @@
<groupId>
com.clickhouse
</groupId>
<artifactId>
clickhouse-jdbc
</artifactId>
<version>
${clickhouse.jdbc.version}
</version>
<optional>
true
</optional>
<!-- use uber jar with all dependencies included, change classifier to http for smaller jar -->
<classifier>
all
</classifier>
<exclusions>
...
...
@@ -42,12 +41,17 @@
</exclusions>
</dependency>
<!--
数据库相关
-->
<!--
Mybatis-plus
-->
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
${mybatisplus.version}
</version>
<optional>
true
</optional>
</dependency>
<!-- mybatis-plus 多数据源 -->
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
<version>
${mybatisplus.version}
</version>
</dependency>
</dependencies>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment