增加 k8s 探针

This commit is contained in:
laker
2024-04-26 11:26:46 +08:00
parent 540c172f17
commit d8e06d6787

View File

@@ -48,6 +48,18 @@ public class ActuatorController {
return "redirect:http://localhost:8080/actuator/health/ping";
}
@GetMapping("/health/liveness")
@ApiOperation(value = "给k8s用的探针-存活接口")
public String healthLiveness() {
return "redirect:http://localhost:8080/actuator/health/liveness";
}
@GetMapping("/health/readiness")
@ApiOperation(value = "给k8s用的探针-就绪接口")
public String healthReadiness() {
return "redirect:http://localhost:8080/actuator/health/readiness";
}
/**
* 自定义类继承自 InfoContributor
*