summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotagiri, Ramprasad (rp5662) <rp5662@att.com>2019-04-09 22:10:22 -0400
committerKotagiri, Ramprasad (rp5662) <rp5662@att.com>2019-04-09 22:15:40 -0400
commit1efaa9b5667ba11907beb849bf55f14c5927e35e (patch)
tree79434ab0329b287b1c494e1295ad9b605ca21021
parenta7f82864a237478cab07dbbbb227b933ceda32c6 (diff)
Fix for spring auto-wiring issue
Loaded app properties Configuration class into the web application context. This was done to ensure that the application properties are read into the Spring Environment before it is accessed by other beans. Issue-ID: CCSDK-1011 Change-Id: I8ab840b51cc09c0095f53f8e124ca4f1fa896a73 Signed-off-by: Kotagiri, Ramprasad (rp5662) <rp5662@att.com>
-rw-r--r--ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/util/DashboardProperties.java2
-rw-r--r--ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/util/DashboardProperties.java b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/util/DashboardProperties.java
index 63ace9c..d167f9c 100644
--- a/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/util/DashboardProperties.java
+++ b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/util/DashboardProperties.java
@@ -131,7 +131,7 @@ public class DashboardProperties {
*/
@Autowired
public void setEnvironment(final Environment environment) {
- this.environment = environment;
+ DashboardProperties.environment = environment;
}
/**
diff --git a/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java b/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java
index b49add1..9c6b95e 100644
--- a/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java
+++ b/ccsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java
@@ -19,6 +19,7 @@
*/
package org.onap.portalapp.conf;
+import org.onap.ccsdk.dashboard.util.DashboardProperties;
import org.onap.portalsdk.core.conf.AppInitializer;
public class ExternalAppInitializer extends AppInitializer {
@@ -34,7 +35,7 @@ public class ExternalAppInitializer extends AppInitializer {
// Show something on stdout to indicate the app is starting.
System.out.println(
"ExternalAppInitializer: servlet configuration class is " + appConfigClass.getName());
- return new Class[] {appConfigClass};
+ return new Class[] {appConfigClass, DashboardProperties.class};
}
/*