aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2018-11-13 16:49:57 -0500
committerAlexis de Talhouët <adetalhouet89@gmail.com>2018-11-13 16:49:57 -0500
commit672b7ff399a2a8164bdb0eb8506668f8a7916c48 (patch)
treeb760fbf30971e35ef8b125895dbb0bc2dc1ddca8
parent68b237cb5f3d6dd12fe39aac87254eb341948c9a (diff)
Deterministic startup for resourceSourceMappings
also fix a typo in property name resourceSourceMappings is required for loading the resources (templates, DDs, blueprint), but the bean initializing its values was getting instantiated after the resources loading process, ending up failing loading the resources. Mkaing DataBaseInitService dependent on the ApplicationRegistrationService bean will force SpringBoot to have the dependsOn bean loaded before the one declaring the dependency. Change-Id: Id9781057132ddab51ed5a79143d92436304e6b55 Issue-ID: CCSDK-650 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java
index d7f22e6d..4d2d93d0 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ApplicationRegistrationService.java
@@ -35,10 +35,7 @@ public class ApplicationRegistrationService {
@Value("#{'${resourceSourceMappings}'.split(',')}")
private List<String> resourceSourceMappings;
- public ApplicationRegistrationService() {
- registerDictionarySources();
- }
-
+ @PostConstruct
public void registerDictionarySources() {
log.info("Registering Dictionary Sources : {}", resourceSourceMappings);
if (CollectionUtils.isNotEmpty(resourceSourceMappings)) {