Port to java 17
[ccsdk/apps.git] / ms / sliboot / src / main / java / org / onap / ccsdk / apps / ms / sliboot / SlibootApp.java
index 0d7a547..e393dd0 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
  * You may obtain a copy of the License at\r
- * \r
+ *\r
  *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
+ *\r
  * Unless required by applicable law or agreed to in writing, software\r
  * distributed under the License is distributed on an "AS IS" BASIS,\r
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
@@ -24,6 +24,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;\r
 import org.springframework.boot.SpringApplication;\r
 import org.springframework.boot.autoconfigure.SpringBootApplication;\r
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;\r
 import org.springframework.boot.autoconfigure.domain.EntityScan;\r
 import org.springframework.boot.web.servlet.FilterRegistrationBean;\r
 import org.springframework.context.annotation.ComponentScan;\r
@@ -34,13 +35,13 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 import springfox.documentation.swagger2.annotations.EnableSwagger2;\r
 import org.springframework.context.annotation.Bean;\r
 \r
-import org.onap.aaf.cadi.filter.CadiFilter;\r
+import org.onap.ccsdk.apps.cadi.filter.CadiFilter;\r
 \r
 @SpringBootApplication(scanBasePackages={ "org.onap.ccsdk.apps.ms.sliboot.*", "org.onap.ccsdk.apps.services" })\r
 @EnableJpaRepositories("org.onap.ccsdk.apps.ms.sliboot.*")\r
 @EntityScan("org.onap.ccsdk.apps.ms.sliboot.*")\r
 @EnableTransactionManagement\r
-@EnableSwagger2\r
+// @EnableSwagger2\r
 public class SlibootApp {\r
 \r
   private static final Logger log = LoggerFactory.getLogger(SlibootApp.class);\r
@@ -50,6 +51,7 @@ public class SlibootApp {
   }\r
 \r
   @Bean\r
+  @ConditionalOnProperty("cadi.properties.path")\r
        @Order(1)\r
        public FilterRegistrationBean<CadiFilter> cadiFilter() {\r
                CadiFilter filter = new CadiFilter();\r
@@ -65,6 +67,6 @@ public class SlibootApp {
                }\r
 \r
                return registrationBean;\r
-       } \r
+       }\r
 \r
 }\r