diff --git a/module-server/src/main/kotlin/de/twomartens/timetable/support/controller/v1/HealthCheckController.kt b/module-server/src/main/kotlin/de/twomartens/timetable/support/controller/v1/HealthCheckController.kt new file mode 100644 index 0000000..bea59aa --- /dev/null +++ b/module-server/src/main/kotlin/de/twomartens/timetable/support/controller/v1/HealthCheckController.kt @@ -0,0 +1,19 @@ +package de.twomartens.timetable.support.controller.v1 + +import de.twomartens.timetable.property.ServiceProperties +import io.swagger.v3.oas.annotations.Hidden +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +@RequestMapping(value = ["/timetable/v1"]) +class HealthCheckController(private val properties: ServiceProperties) { + + + @Hidden + @GetMapping("/healthCheck") + fun healthCheck(message: String): String { + return properties.greeting.format(message) + } +} \ No newline at end of file