diff options
author | Rupinder <rupinsi1@in.ibm.com> | 2020-04-23 13:31:50 +0530 |
---|---|---|
committer | Rupinderjeet Singh <rupinsi1@in.ibm.com> | 2020-04-23 11:17:01 +0000 |
commit | 72d6d52727345dfbfdd6fdf7532268599f2f7999 (patch) | |
tree | 3ccac9655c2e0eced48d0b5dbacc3df20f3400a6 /ecomp-portal-widget-ms | |
parent | 21e503048d2d083e532064de6aab0fcb7ae0dea1 (diff) |
added annotations for api's
Issue-ID: PORTAL-865
Change-Id: Ied1d101cb246b9e433c7cc968fa95ca4bcdbfcb5
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-portal-widget-ms')
2 files changed, 8 insertions, 6 deletions
diff --git a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/controller/DatabaseFileUploadController.java b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/controller/DatabaseFileUploadController.java index acdde23b..7d0600f6 100644 --- a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/controller/DatabaseFileUploadController.java +++ b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/controller/DatabaseFileUploadController.java @@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; @@ -24,7 +25,7 @@ public class DatabaseFileUploadController { private static final Logger logger = LoggerFactory.getLogger(DatabaseFileUploadController.class); @ResponseBody - @RequestMapping(value = "/microservices/markup/{widgetId}", method = RequestMethod.GET) + @GetMapping(value = "/microservices/markup/{widgetId}") public String getWidgetMarkup(HttpServletRequest request, HttpServletResponse response, @PathVariable("widgetId") long widgetId){ String markup = null; try{ @@ -37,7 +38,7 @@ public class DatabaseFileUploadController { } @ResponseBody - @RequestMapping(value = "/microservices/{widgetId}/controller.js", method = RequestMethod.GET) + @GetMapping(value = "/microservices/{widgetId}/controller.js") public String getWidgetController(HttpServletRequest request, HttpServletResponse response, @PathVariable("widgetId") long widgetId){ String controller = null; try{ @@ -50,7 +51,7 @@ public class DatabaseFileUploadController { } @ResponseBody - @RequestMapping(value = "/microservices/{widgetId}/framework.js", method = RequestMethod.GET) + @GetMapping(value = "/microservices/{widgetId}/framework.js") public String getWidgetFramework(HttpServletRequest request, HttpServletResponse response, @PathVariable("widgetId") long widgetId){ String framework = null; @@ -64,7 +65,7 @@ public class DatabaseFileUploadController { } @ResponseBody - @RequestMapping(value = "/microservices/{widgetId}/styles.css", method = RequestMethod.GET) + @GetMapping(value = "/microservices/{widgetId}/styles.css") public String getWidgetCSS(HttpServletRequest request, HttpServletResponse response, @PathVariable("widgetId") long widgetId){ String css = null; diff --git a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/controller/HealthController.java b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/controller/HealthController.java index 6814f75a..8674d8ed 100644 --- a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/controller/HealthController.java +++ b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/controller/HealthController.java @@ -4,13 +4,14 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; - + @RestController public class HealthController { - @RequestMapping(value = { "/health" }, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = { "/health" }, produces = "application/json") public HealthStatus getWidgetCatalog(HttpServletRequest request, HttpServletResponse response) { return new HealthStatus("ok"); } |