diff --git a/extensions/data-import/runtime/src/main/java/org/tkit/quarkus/dataimport/DataImportRuntimeConfig.java b/extensions/data-import/runtime/src/main/java/org/tkit/quarkus/dataimport/DataImportRuntimeConfig.java index f9bdd10..6296627 100644 --- a/extensions/data-import/runtime/src/main/java/org/tkit/quarkus/dataimport/DataImportRuntimeConfig.java +++ b/extensions/data-import/runtime/src/main/java/org/tkit/quarkus/dataimport/DataImportRuntimeConfig.java @@ -7,7 +7,7 @@ import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; -@ConfigRoot(prefix = "tkit", name = "dataimport", phase = ConfigPhase.BOOTSTRAP) +@ConfigRoot(prefix = "tkit", name = "dataimport", phase = ConfigPhase.RUN_TIME) public class DataImportRuntimeConfig { /** diff --git a/extensions/test-db-import/deployment/src/main/java/org/tkit/quarkus/test/dbimport/DevServicesDbImportProcessor.java b/extensions/test-db-import/deployment/src/main/java/org/tkit/quarkus/test/dbimport/DevServicesDbImportProcessor.java index f8489fa..f693f62 100644 --- a/extensions/test-db-import/deployment/src/main/java/org/tkit/quarkus/test/dbimport/DevServicesDbImportProcessor.java +++ b/extensions/test-db-import/deployment/src/main/java/org/tkit/quarkus/test/dbimport/DevServicesDbImportProcessor.java @@ -105,8 +105,28 @@ public DevServicesResultBuildItem startDbImportDevService( private static void setupDbResultSystemProperties(HashMap data, DevServicesDatasourceResultBuildItem.DbResult dbResult) { + + String jdbcUrlKey = null; + String reactiveUrlKey = null; + String reactiveUrlValue = null; if (dbResult != null && DatabaseKind.POSTGRESQL.equals(dbResult.getDbType())) { - dbResult.getConfigProperties().forEach((k, v) -> data.put("tkit-db-import." + k, v)); + for (Map.Entry e : dbResult.getConfigProperties().entrySet()) { + if (e.getKey().lastIndexOf("jdbc.url") > 0) { + jdbcUrlKey = e.getKey(); + } + if (e.getKey().lastIndexOf("reactive.url") > 0) { + reactiveUrlKey = e.getKey(); + reactiveUrlValue = e.getValue(); + } + data.put("tkit-db-import." + e.getKey(), e.getValue()); + } + } + + // add support for only reactive vertx client dependency + if (jdbcUrlKey == null && reactiveUrlValue != null) { + String newValue = reactiveUrlValue.replace("vertx-reactive", "jdbc"); + jdbcUrlKey = reactiveUrlKey.replace("reactive", "jdbc"); + data.put("tkit-db-import." + jdbcUrlKey, newValue); } }