init commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package ru.mtusi.messenger.controller;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import ru.mtusi.messenger.dto.HealthDTO;
|
||||
import ru.mtusi.messenger.service.HealthService;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class HealthController implements HealthApi {
|
||||
|
||||
private final HealthService healthService;
|
||||
|
||||
@Override
|
||||
public ResponseEntity<HealthDTO> liveness() {
|
||||
return ResponseEntity.ok(healthService.liveness());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<HealthDTO> readiness() {
|
||||
return ResponseEntity.ok(healthService.readiness());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user