Commit 02ac3846 authored by Michael Menzel's avatar Michael Menzel

status page

parent 45949e4c
......@@ -18,10 +18,12 @@ package de.thm.spring.controller;
import de.thm.command.ExpressionCommand;
import de.thm.command.InterfaceCommand;
import de.thm.monitoring.Monitor;
import de.thm.spring.backend.Sessions;
import de.thm.spring.backend.StatisticsCollector;
import org.springframework.boot.autoconfigure.web.ErrorController;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -121,4 +123,15 @@ public class ApplicationController implements ErrorController {
return "contact";
}
@RequestMapping("/status")
public ResponseEntity monitor() {
if (Monitor.isConnectionAlive())
return new ResponseEntity(HttpStatus.valueOf(200));
return new ResponseEntity(HttpStatus.valueOf(500));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment