From 90562a5f82d2544fb772aea4a655bbfbeb2c1c70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BD=99=E5=B4=87=E9=93=AD?= <627433532@qq.com>
Date: Thu, 4 May 2023 23:45:00 +0800
Subject: [PATCH] =?UTF-8?q?Kdatabase=E6=97=A0=E6=B3=95=E8=BD=AC=E6=8D=A2?=
=?UTF-8?q?=E4=B8=BADatabase=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vertx-gaia/vertx-ams/pom.xml | 4 ++++
.../src/main/java/io/horizon/atom/app/KDatabase.java | 7 ++++---
.../src/main/java/io/vertx/up/commune/config/Database.java | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/vertx-gaia/vertx-ams/pom.xml b/vertx-gaia/vertx-ams/pom.xml
index 7dfc27aaf..71569ddfa 100644
--- a/vertx-gaia/vertx-ams/pom.xml
+++ b/vertx-gaia/vertx-ams/pom.xml
@@ -92,5 +92,9 @@
io.netty
netty-buffer
+
+ cn.vertxup
+ vertx-co
+
\ No newline at end of file
diff --git a/vertx-gaia/vertx-ams/src/main/java/io/horizon/atom/app/KDatabase.java b/vertx-gaia/vertx-ams/src/main/java/io/horizon/atom/app/KDatabase.java
index 2a4bd8b48..b5190ec87 100644
--- a/vertx-gaia/vertx-ams/src/main/java/io/horizon/atom/app/KDatabase.java
+++ b/vertx-gaia/vertx-ams/src/main/java/io/horizon/atom/app/KDatabase.java
@@ -12,6 +12,7 @@ import io.horizon.specification.typed.TJson;
import io.horizon.uca.log.Annal;
import io.horizon.util.HUt;
import io.vertx.core.json.JsonObject;
+import io.vertx.up.commune.config.Database;
import java.io.Serializable;
import java.sql.DriverManager;
@@ -230,11 +231,11 @@ public class KDatabase implements Serializable, TCopy, TJson {
@Override
@SuppressWarnings("unchecked")
- public CHILD copy() {
+ public Database copy() {
final JsonObject json = this.toJson().copy();
- final KDatabase database = new KDatabase();
+ final Database database = new Database();
database.fromJson(json);
- return (CHILD) database;
+ return database;
}
@Override
diff --git a/vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/config/Database.java b/vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/config/Database.java
index 449e28693..0c6e229b3 100644
--- a/vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/config/Database.java
+++ b/vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/config/Database.java
@@ -65,7 +65,7 @@ public class Database extends KDatabase {
if (Objects.isNull(DATABASE)) {
DATABASE = getDatabase(DsSource.PRIMARY, "jooq", CURRENT);
}
- return (Database) DATABASE.copy();
+ return DATABASE.copy();
}
public static Database getHistory() {
--
Gitee