X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fcps%2Fnotification%2FNotificationProperties.java;h=3776a93d94ee74c2a5c7242d23f5bc3fa1b818e5;hb=1c90848a0cb078e0249a7dc888ea05390f59a1e6;hp=eb75e3f75eaf442eef256df872b02ec9adc11765;hpb=529f92c549a16ecd9ead36cc00d6f74f775ca638;p=cps.git diff --git a/cps-service/src/main/java/org/onap/cps/notification/NotificationProperties.java b/cps-service/src/main/java/org/onap/cps/notification/NotificationProperties.java index eb75e3f75..3776a93d9 100644 --- a/cps-service/src/main/java/org/onap/cps/notification/NotificationProperties.java +++ b/cps-service/src/main/java/org/onap/cps/notification/NotificationProperties.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.Map; import javax.validation.constraints.NotNull; import lombok.Data; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; import org.springframework.validation.annotation.Validated; @@ -36,6 +37,7 @@ public class NotificationProperties { @NotNull private String topic; private Map filters = Collections.emptyMap(); - @NotNull - private boolean enabled = false; + + @Value("${notification.enabled:true}") + private boolean enabled; }