mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
add default value to allow app startup even if the setting is missing in config.yml
This commit is contained in:
@@ -17,8 +17,10 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import io.dropwizard.Configuration;
|
import io.dropwizard.Configuration;
|
||||||
import io.dropwizard.db.DataSourceFactory;
|
import io.dropwizard.db.DataSourceFactory;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
@Setter
|
||||||
public class CommaFeedConfiguration extends Configuration {
|
public class CommaFeedConfiguration extends Configuration {
|
||||||
|
|
||||||
public enum CacheType {
|
public enum CacheType {
|
||||||
@@ -56,6 +58,7 @@ public class CommaFeedConfiguration extends Configuration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
@Setter
|
||||||
public static class ApplicationSettings {
|
public static class ApplicationSettings {
|
||||||
@NotNull
|
@NotNull
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@@ -126,7 +129,7 @@ public class CommaFeedConfiguration extends Configuration {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Valid
|
@Valid
|
||||||
private Integer maxFeedsPerUser;
|
private Integer maxFeedsPerUser = 0;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Min(0)
|
@Min(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user