X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fcontroller%2FMicroserviceProxyController.java;h=dc652d590a43a406d8b59c8789fb9a3560469016;hb=e27e8a75ca9d92b6694b109f3e5d3c79ce673473;hp=fed3b98e7610621548c51b8f2308880806e5e56a;hpb=24608a9e1450c409dc3870440d29e91cc3a26bb9;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java index fed3b98e..dc652d59 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java @@ -4,6 +4,8 @@ * =================================================================== * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== + * Modification Copyright © 2020 IBM. + * =================================================================== * * Unless otherwise specified, all software contained herein is licensed * under the Apache License, Version 2.0 (the "License"); @@ -51,8 +53,7 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.HttpClientErrorException; @@ -69,8 +70,7 @@ public class MicroserviceProxyController extends EPUnRestrictedBaseController { @Autowired private MicroserviceProxyService microserviceProxyService; - @RequestMapping(value = { "/portalApi/microservice/proxy/{serviceId}" }, method = { - RequestMethod.GET }, produces = "application/json") + @GetMapping(value = { "/portalApi/microservice/proxy/{serviceId}" }, produces = "application/json") public String getMicroserviceProxy(HttpServletRequest request, HttpServletResponse response, @PathVariable("serviceId") long serviceId) throws Exception { EPUser user = EPUserUtils.getUserSession(request); @@ -83,8 +83,7 @@ public class MicroserviceProxyController extends EPUnRestrictedBaseController { return isValidJSON(answer) ? answer : "{\"error\":\"" + answer.replace(System.getProperty("line.separator"), "") + "\"}"; } - @RequestMapping(value = { "/portalApi/microservice/proxy/parameter/{widgetId}" }, method = { - RequestMethod.GET }, produces = "application/json") + @GetMapping(value = { "/portalApi/microservice/proxy/parameter/{widgetId}" }, produces = "application/json") public String getMicroserviceProxyByWidgetId(HttpServletRequest request, HttpServletResponse response, @PathVariable("widgetId") long widgetId) throws Exception { EPUser user = EPUserUtils.getUserSession(request);