summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupController.java
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupController.java')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupController.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupController.java
index b0bc9fc4..e8bd9622 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupController.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupController.java
@@ -26,6 +26,7 @@ import org.openecomp.portalapp.controller.EPUnRestrictedBaseController;
import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.openecomp.portalsdk.core.util.SystemProperties;
import org.springframework.beans.factory.annotation.Autowired;
@@ -46,9 +47,7 @@ import org.springframework.web.multipart.commons.CommonsMultipartResolver;
public class WidgetsCatalogMarkupController extends EPUnRestrictedBaseController {
private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetsCatalogMarkupController.class);
-
private RestTemplate template = new RestTemplate();
-
private final String whatService = "widgets-service";
@Autowired
@@ -77,7 +76,7 @@ public class WidgetsCatalogMarkupController extends EPUnRestrictedBaseController
@PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
return template
.getForObject(
- "https://"
+ EcompPortalUtils.widgetMsProtocol() + "://"
+ consulHealthService.getServiceLocation(whatService,
SystemProperties.getProperty("microservices.widget.local.port"))
+ "/widget/microservices/markup/" + widgetId,