aboutsummaryrefslogtreecommitdiffstats
path: root/ms/sliboot/src/main
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2021-06-23 11:02:05 -0400
committerDan Timoney <dtimoney@att.com>2021-06-23 11:02:05 -0400
commit1acaa2eeae7a185534e2d4bf99300bd8bab73abb (patch)
tree179d909487f813454afb13970b9f85e86da2b9df /ms/sliboot/src/main
parenta90eecf70419ec4acba6f5a8425300eef7f45290 (diff)
Only enable CadiFilter if prop file set
Only enable CadiFilter if cadi.properties.path property is set Issue-ID: CCSDK-3349 Signed-off-by: Dan Timoney <dtimoney@att.com> Change-Id: If275fb839996ebb93317e9de8a2f2256c99b87b9
Diffstat (limited to 'ms/sliboot/src/main')
-rw-r--r--ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java
index 0d7a547f..36048ea4 100644
--- a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java
+++ b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java
@@ -24,6 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.ComponentScan;
@@ -49,7 +50,10 @@ public class SlibootApp {
SpringApplication.run(SlibootApp.class, args);
}
+
+
@Bean
+ @ConditionalOnProperty("cadi.properties.path")
@Order(1)
public FilterRegistrationBean<CadiFilter> cadiFilter() {
CadiFilter filter = new CadiFilter();