aboutsummaryrefslogtreecommitdiffstats
path: root/prh-app-server/src/main
diff options
context:
space:
mode:
authorgrabinsk <maciej.grabinski@nokia.com>2019-07-02 16:05:24 +0200
committergrabinsk <maciej.grabinski@nokia.com>2019-07-02 16:05:24 +0200
commitce3730c7286f03375f38215a50af1ae6530a4845 (patch)
tree1a088ea9827d6575cd264a114cebb2ac74f31ec1 /prh-app-server/src/main
parent768ab8275b35750ebf46411be54e7bd452a95578 (diff)
fix CbsConfiguration update bug
'CbsConfiguration' bean is statefull. The singleton instance lifespan should match application lifespan. The problem was bootstrap context (and all it's beans) are destroyed during bootstrap context refresh. Change-Id: Ib02cd49c37935422d4ca861afee55f621015146e Issue-ID: DCAEGEN2-1647 Signed-off-by: grabinsk <maciej.grabinski@nokia.com>
Diffstat (limited to 'prh-app-server/src/main')
-rw-r--r--prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsBootstrapConfiguration.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsBootstrapConfiguration.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsBootstrapConfiguration.java
index df318550..f668a581 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsBootstrapConfiguration.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsBootstrapConfiguration.java
@@ -30,6 +30,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration
@EnableConfigurationProperties(CbsProperties.class)
public class CbsBootstrapConfiguration {
+ private static final CbsConfiguration CBS_CONFIGURATION = new CbsConfiguration();
@Bean
public CbsProperties cbsProperties() {
@@ -52,6 +53,6 @@ public class CbsBootstrapConfiguration {
@Bean
public CbsConfiguration cbsConfiguration() {
- return new CbsConfiguration();
+ return CBS_CONFIGURATION;
}
}