From 12ab5b1e7b8fd9b19a33ee933d25373d3913f5a8 Mon Sep 17 00:00:00 2001 From: Athou Date: Tue, 30 May 2023 10:53:28 +0200 Subject: [PATCH] add default value to allow app startup even if the setting is missing in config.yml --- .../src/main/java/com/commafeed/CommaFeedConfiguration.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commafeed-server/src/main/java/com/commafeed/CommaFeedConfiguration.java b/commafeed-server/src/main/java/com/commafeed/CommaFeedConfiguration.java index 333fde04..5dbc3d11 100644 --- a/commafeed-server/src/main/java/com/commafeed/CommaFeedConfiguration.java +++ b/commafeed-server/src/main/java/com/commafeed/CommaFeedConfiguration.java @@ -17,8 +17,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import io.dropwizard.Configuration; import io.dropwizard.db.DataSourceFactory; import lombok.Getter; +import lombok.Setter; @Getter +@Setter public class CommaFeedConfiguration extends Configuration { public enum CacheType { @@ -56,6 +58,7 @@ public class CommaFeedConfiguration extends Configuration { } @Getter + @Setter public static class ApplicationSettings { @NotNull @NotBlank @@ -126,7 +129,7 @@ public class CommaFeedConfiguration extends Configuration { @NotNull @Valid - private Integer maxFeedsPerUser; + private Integer maxFeedsPerUser = 0; @NotNull @Min(0)