23 lines
687 B
Java
23 lines
687 B
Java
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());
|
|
}
|
|
} |