From: puthuparambil.aditya Date: Tue, 19 Oct 2021 11:06:57 +0000 (+0100) Subject: Fixing ciruclar dependency issue X-Git-Tag: mr/823/126723/7~53 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=d5bc2ef86b68ba6e8fdc8cf808e9cc0065ce2ae2;p=cps.git Fixing ciruclar dependency issue Issue-ID: CPS-738 Signed-off-by: puthuparambil.aditya Change-Id: I74a0aefb477d36ba2320332fd82e91cf8324bd84 --- diff --git a/cps-service/src/main/java/org/onap/cps/notification/CpsDataUpdatedEventFactory.java b/cps-service/src/main/java/org/onap/cps/notification/CpsDataUpdatedEventFactory.java index 85e5abab0d..2985ed53bb 100644 --- a/cps-service/src/main/java/org/onap/cps/notification/CpsDataUpdatedEventFactory.java +++ b/cps-service/src/main/java/org/onap/cps/notification/CpsDataUpdatedEventFactory.java @@ -34,6 +34,7 @@ import org.onap.cps.spi.FetchDescendantsOption; import org.onap.cps.spi.model.Anchor; import org.onap.cps.spi.model.DataNode; import org.onap.cps.utils.DataMapUtils; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; @Component @@ -58,7 +59,8 @@ public class CpsDataUpdatedEventFactory { private final CpsDataService cpsDataService; private final CpsAdminService cpsAdminService; - public CpsDataUpdatedEventFactory(final CpsDataService cpsDataService, final CpsAdminService cpsAdminService) { + public CpsDataUpdatedEventFactory(@Lazy final CpsDataService cpsDataService, + final CpsAdminService cpsAdminService) { this.cpsDataService = cpsDataService; this.cpsAdminService = cpsAdminService; }