Add env var for svclogic props
[ccsdk/sli/core.git] / sliapi / springboot / src / main / java / org / onap / ccsdk / sli / core / sliapi / springboot / core / SvcLogicFactory.java
index 9b521e4..cf8dc5e 100644 (file)
@@ -63,7 +63,16 @@ public class SvcLogicFactory {
       @Override\r
       public Properties getProperties() {\r
         Properties props = new Properties();\r
-        String propPath = "src/main/resources/svclogic.properties";\r
+\r
+        String propPath = System.getProperty("serviceLogicProperties", "");\r
+\r
+        if ("".equals(propPath)) {\r
+          propPath = System.getenv("SVCLOGIC_PROPERTIES");\r
+        }\r
+\r
+        if ((propPath == null) || propPath.length() == 0) {\r
+          propPath = "src/main/resources/svclogic.properties";\r
+        }\r
         System.out.println(propPath);\r
         try (FileInputStream fileInputStream = new FileInputStream(propPath)) {\r
           props = new Properties();\r