Skip to content

Commit

Permalink
feat!: update to Quarkus 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras committed Aug 24, 2023
1 parent 0670445 commit a8f7eba
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,28 @@ public DevServicesResultBuildItem startDbImportDevService(

private static void setupDbResultSystemProperties(HashMap<String, String> 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<String, String> 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);
}
}

Expand Down

0 comments on commit a8f7eba

Please sign in to comment.