From a41f3c216de525a6353f6407d79c22bb15758b74 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 18 Feb 2021 16:39:51 -0500 Subject: [PATCH] Support env variables in svclogic.properties Use EnvProperties class to load svclogic.properties in order to support environment variables for property values. Change-Id: I2a0e0753ae0e067d73c298c3a18800e5d0928482 Issue-ID: SDNC-1482 Signed-off-by: Dan Timoney --- .../src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java b/services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java index 30a85ac8..44c56af3 100644 --- a/services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java +++ b/services/src/main/java/org/onap/ccsdk/apps/services/SvcLogicFactory.java @@ -54,6 +54,7 @@ import org.onap.ccsdk.sli.core.sli.provider.base.SvcLogicServiceImplBase; import org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder; import org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils; import org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils; +import org.onap.ccsdk.sli.core.utils.common.EnvProperties; import org.onap.ccsdk.sli.plugins.prop.PropertiesNode; import org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode; import org.slf4j.Logger; @@ -98,7 +99,7 @@ public class SvcLogicFactory { } System.out.println(propPath); try (FileInputStream fileInputStream = new FileInputStream(propPath)) { - props = new Properties(); + props = new EnvProperties(); props.load(fileInputStream); } catch (final IOException e) { log.error("Failed to load properties for file: {}", propPath, -- 2.16.6