removed some unused imports
[portal.git] / ecomp-portal-widget-ms / widget-ms / src / main / java / org / onap / portalapp / widget / controller / HealthController.java
1 package org.onap.portalapp.widget.controller;
2
3 import javax.servlet.http.HttpServletRequest;
4 import javax.servlet.http.HttpServletResponse;
5
6 import org.springframework.web.bind.annotation.GetMapping;
7 import org.springframework.web.bind.annotation.RestController;
8  
9 @RestController
10 public class HealthController {
11
12         @GetMapping(value = { "/health" }, produces = "application/json")
13         public HealthStatus getWidgetCatalog(HttpServletRequest request, HttpServletResponse response) {
14                 return new HealthStatus("ok");
15         }
16         
17         class HealthStatus {
18                 private String status;
19                 
20                 public HealthStatus(String status){
21                         this.status = status;
22                 }
23
24                 public String getStatus() {
25                         return status;
26                 }
27
28                 public void setStatus(String status) {
29                         this.status = status;
30                 }
31                 
32                 
33         }
34 }