0

How would I implement a custom endpoint in SpringBoot to achieve the following:

http://localhost:8080/actuator/health/custom

where "custom" is the endpoint I want to implement that extends health.

jukyduky
  • 39
  • 5
  • Possible duplicate of [How to add a custom health check in spring boot health?](https://stackoverflow.com/questions/44849568/how-to-add-a-custom-health-check-in-spring-boot-health) – Naveen Sep 16 '19 at 23:22

1 Answers1

0

That url is used to expose the Health checks for the application, if that is your situation, you only need to include the dependencies for the actuator :

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>

and you can see the status of the app.

If you need something more specific, only configure the dependency as you can see here .

Also you can override the behavior of the healthchecks but that dependency have a lot of functionality.

  • Hello, this will only inject the actuator dependency that allows me to use the default actuator endpoints, such as: /health, /info, /metrics... I want to know how to extend a custom endpoint; e.g, "/actuator/health/custom" – jukyduky Sep 16 '19 at 22:20