
fi.evolver.basics.spring.status.StatusController Maven / Gradle / Ivy
package fi.evolver.basics.spring.status;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import fi.evolver.basics.spring.http.MessageType;
import fi.evolver.basics.spring.status.model.ComponentStatus;
@RestController
@RequestMapping("/status")
public class StatusController {
private final StatusReportService statusReportService;
@Autowired
public StatusController(StatusReportService statusReportService) {
this.statusReportService = statusReportService;
}
@MessageType("Status")
@GetMapping()
public List getStatus() {
return statusReportService.getStatus();
}
@MessageType("Status")
@GetMapping("/{reportable}")
public List getStatusByReportable(@PathVariable String reportable) {
return statusReportService.getStatusByReportable(reportable);
}
@MessageType("Status")
@GetMapping("/reportables")
public List listReportables() {
return statusReportService.listReportables();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy