Add basic health check endpoint
This commit is contained in:
parent
559124460d
commit
6f9e89a9d5
@ -0,0 +1,25 @@
|
|||||||
|
package com.nisemoe.nise.controller
|
||||||
|
|
||||||
|
import org.jooq.DSLContext
|
||||||
|
import org.springframework.http.ResponseEntity
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping
|
||||||
|
import org.springframework.web.bind.annotation.RestController
|
||||||
|
|
||||||
|
data class HealthResponse(
|
||||||
|
val healthy: Boolean,
|
||||||
|
)
|
||||||
|
|
||||||
|
val healthResponse = HealthResponse(
|
||||||
|
healthy = true,
|
||||||
|
)
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
class HealthController(
|
||||||
|
private val dslContext: DSLContext
|
||||||
|
) {
|
||||||
|
@GetMapping("/health")
|
||||||
|
fun healthCheck(): ResponseEntity<HealthResponse> {
|
||||||
|
return ResponseEntity.ok(healthResponse)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user