X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=holmes-actions%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fholmes%2Fcommon%2Faai%2FCorrelationUtil.java;h=51b4cf0a74ba841f14b722d837200f86b9f12b40;hb=0c795a78a515168eb600744bf43906d4fd195b30;hp=6520552a5a63e04c1523476c5091f172b4558868;hpb=0ed4589721f3acd3778c470be233ada0d545599f;p=holmes%2Fcommon.git diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/CorrelationUtil.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/CorrelationUtil.java index 6520552..51b4cf0 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/aai/CorrelationUtil.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/CorrelationUtil.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 ZTE Corporation. + * Copyright 2017-2021 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -13,13 +13,14 @@ */ package org.onap.holmes.common.aai; -import java.util.List; -import java.util.Optional; import lombok.extern.slf4j.Slf4j; import org.onap.holmes.common.aai.entity.RelationshipList.Relationship; import org.onap.holmes.common.aai.entity.VmEntity; -import org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder; import org.onap.holmes.common.exception.CorrelationException; +import org.onap.holmes.common.utils.SpringContextUtil; + +import java.util.List; +import java.util.Optional; @Slf4j public class CorrelationUtil { @@ -33,7 +34,7 @@ public class CorrelationUtil { public static final CorrelationUtil getInstance() { if (aaiQuery == null) { - aaiQuery = ServiceLocatorHolder.getLocator().getService(AaiQuery.class); + aaiQuery = SpringContextUtil.getBean(AaiQuery.class); } return LazyHolder.INSTANCE; }