Spring Boot 2 health actuator default mapping

Boni García picture Boni García · Sep 22, 2017 · Viewed 16.4k times · Source

I'm using Spring Boot 2 M3 actuators. By default, the health endpoint is mapped to /application/health.

  • Is it possible to change this path to /health?

Answer

Sophia Price picture Sophia Price · Nov 22, 2018

In your application.properties file add this to set the base path to '/'

management.endpoints.web.base-path=/

Path will now be '/health'

Edit: Alternatively if you are using YAML use:

management:
  endpoints:
    web:
      base-path: /