From cdd280a30047631062fe45dd85ce2dc4f5a03b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mathieu?= Date: Wed, 1 Sep 2021 11:56:12 +0200 Subject: [PATCH] Add missing @ConfigItem annotations --- .../LiquibaseMongodbBuildTimeConfig.java | 4 ++- .../runtime/LiquibaseMongodbConfig.java | 30 ++++++++++++++----- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/extensions/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseMongodbBuildTimeConfig.java b/extensions/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseMongodbBuildTimeConfig.java index 9bd5432a0f75e..8945d1d07b549 100644 --- a/extensions/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseMongodbBuildTimeConfig.java +++ b/extensions/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseMongodbBuildTimeConfig.java @@ -1,5 +1,6 @@ package io.quarkus.liquibase.runtime; +import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; @@ -12,5 +13,6 @@ public class LiquibaseMongodbBuildTimeConfig { /** * The change log file */ - public String changeLog = "db/changeLog.xml"; + @ConfigItem(defaultValue = "db/changeLog.xml") + public String changeLog; } diff --git a/extensions/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseMongodbConfig.java b/extensions/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseMongodbConfig.java index 6cab1009c19d7..0917e5204285e 100644 --- a/extensions/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseMongodbConfig.java +++ b/extensions/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/runtime/LiquibaseMongodbConfig.java @@ -1,9 +1,11 @@ package io.quarkus.liquibase.runtime; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; +import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; @@ -16,53 +18,67 @@ public class LiquibaseMongodbConfig { /** * The migrate at start flag */ - public boolean migrateAtStart = false; + @ConfigItem + public boolean migrateAtStart; /** * The validate on update flag */ - public boolean validateOnMigrate = true; + @ConfigItem(defaultValue = "true") + public boolean validateOnMigrate; /** * The clean at start flag */ - public boolean cleanAtStart = false; + @ConfigItem + public boolean cleanAtStart; - public Map changeLogParameters = null; + /** + * The parameters to be passed to the changelog. + * Defined as key value pairs. + */ + @ConfigItem + public Map changeLogParameters = new HashMap<>();; /** * The list of contexts */ - public Optional> contexts = null; + @ConfigItem + public Optional> contexts = Optional.empty(); /** * The list of labels */ - public Optional> labels = null; + @ConfigItem + public Optional> labels = Optional.empty(); /** * The default catalog name */ + @ConfigItem public Optional defaultCatalogName = Optional.empty(); /** * The default schema name */ + @ConfigItem public Optional defaultSchemaName = Optional.empty(); /** * The liquibase tables catalog name */ + @ConfigItem public Optional liquibaseCatalogName = Optional.empty(); /** * The liquibase tables schema name */ + @ConfigItem public Optional liquibaseSchemaName = Optional.empty(); /** * The liquibase tables tablespace name */ + @ConfigItem public Optional liquibaseTablespaceName = Optional.empty(); - }