diff options
author | da490c <dave.adams@amdocs.com> | 2018-04-07 12:04:22 -0400 |
---|---|---|
committer | da490c <dave.adams@amdocs.com> | 2018-04-07 12:04:44 -0400 |
commit | 37b2c60102f7b99f7c48ba8b9cb4f9c9a79ccc3c (patch) | |
tree | b68fa33cde1dcc8daac5b5524e8d2714a08347db /sparkybe-onap-application/src/main/java | |
parent | 959cdac3aa172a62a7674a3995d61753a4eb842b (diff) |
Fix non-standard linux env var names
Issue-ID: AAI-1008
Change-Id: If6f66fb5c9f51d69ef65cb8a05abca55610f1256
Signed-off-by: da490c <dave.adams@amdocs.com>
Diffstat (limited to 'sparkybe-onap-application/src/main/java')
-rw-r--r-- | sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java index f4df67f..2ffa433 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java @@ -35,8 +35,10 @@ import org.springframework.context.annotation.Bean; @SpringBootApplication public class Application { - private static final String SPARKY_SSL_ENABLED = "sparky.ssl.enabled"; - private static final String SPARKY_PORTAL_ENABLED = "sparky.portal.enabled"; + private static final String SPARKY_SSL_ENABLED_PROPERTY = "sparky.ssl.enabled"; + private static final String SPARKY_PORTAL_ENABLED_PROPERTY = "sparky.portal.enabled"; + private static final String SPARKY_SSL_ENABLED_ENV = "SPARKY_SSL_ENABLED"; + private static final String SPARKY_PORTAL_ENABLED_ENV = "SPARKY_PORTAL_ENABLED"; private Filter loginFilter = new LoginFilter(); @@ -56,25 +58,24 @@ public class Application { * properties for local development and interop in some situations. */ - if (System.getenv(SPARKY_SSL_ENABLED) == null) { - System.setProperty(SPARKY_SSL_ENABLED, "true"); + if (System.getenv(SPARKY_SSL_ENABLED_ENV) == null) { + System.setProperty(SPARKY_SSL_ENABLED_PROPERTY, "true"); } else { - System.setProperty(SPARKY_SSL_ENABLED, System.getenv(SPARKY_SSL_ENABLED)); + System.setProperty(SPARKY_SSL_ENABLED_PROPERTY, System.getenv(SPARKY_SSL_ENABLED_ENV)); } - boolean sslEnabled = Boolean.parseBoolean(System.getProperty(SPARKY_SSL_ENABLED)); + boolean sslEnabled = Boolean.parseBoolean(System.getProperty(SPARKY_SSL_ENABLED_PROPERTY)); if (sslEnabled) { System.setProperty("server.ssl.key-store-password", System.getenv("KEYSTORE_PASSWORD")); System.setProperty("server.ssl.key-password", System.getenv("KEYSTORE_ALIAS_PASSWORD")); } - if (System.getenv(SPARKY_PORTAL_ENABLED) == null) { - System.setProperty(SPARKY_PORTAL_ENABLED, "true"); + if (System.getenv(SPARKY_PORTAL_ENABLED_ENV) == null) { + System.setProperty(SPARKY_PORTAL_ENABLED_PROPERTY, "true"); } else { - System.setProperty(SPARKY_PORTAL_ENABLED, System.getenv(SPARKY_PORTAL_ENABLED)); + System.setProperty(SPARKY_PORTAL_ENABLED_PROPERTY, System.getenv(SPARKY_PORTAL_ENABLED_ENV)); } - } /* |