add default value to allow app startup even if the setting is missing in config.yml

This commit is contained in:
Athou
2023-05-30 10:53:28 +02:00
parent 3e6451289f
commit 12ab5b1e7b

View File

@@ -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)