Skip to content

Commit abf52c3

Browse files
committed
Java: MultiDataSource 新增支持 Databend - 带 AI 的新一代云原生数据湖仓(Snowflake 开源替代)
1 parent f3cd6a2 commit abf52c3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@
7676
<artifactId>apijson-fastjson2</artifactId>
7777
<version>1.0.2</version>
7878
</dependency>
79+
<dependency>
80+
<groupId>com.databend</groupId>
81+
<artifactId>databend-jdbc</artifactId>
82+
<version>0.3.9</version>
83+
</dependency>
7984

8085
<!-- 7.9.0 及以下需要依赖 apijson-column -->
8186
<!-- <dependency>-->

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@ public String gainDBUri() {
309309
//if (isDoris()) {
310310
// return "jdbc:mysql://localhost:9030"; //TODO 改成你自己的,TiDB 可以当成 MySQL 使用,默认端口为 4000
311311
//}
312+
//if (isDatabend()) {
313+
// return "jdbc:databend://localhost:8000?disable_session_token=true"; //TODO 改成你自己的
314+
//}
312315

313316
return super.gainDBUri();
314317
}
@@ -389,6 +392,9 @@ public String gainDBAccount() {
389392
//if (isDoris()) {
390393
// return "root";
391394
//}
395+
//if (isDatabend()) {
396+
// return "root"; //TODO 改成你自己的
397+
//}
392398

393399
return super.gainDBAccount();
394400
}
@@ -468,6 +474,9 @@ public String gainDBPassword() {
468474
//if (isDoris()) {
469475
// return "apijson";
470476
//}
477+
//if (isDatabend()) {
478+
// return null; //TODO 改成你自己的
479+
//}
471480

472481
return super.gainDBPassword();
473482
}

0 commit comments

Comments
 (0)