How to retain old actuator endpoint after springboot upgrade from 1.5.x to 2.3.x

Viewed 144

I am trying to migrate springboot app from 1.5.x to 2.3.x. Have come a long way. I understand that now for health check the endpoint is /actuator/health as opposed to /health in the older version.

On openshift the config still refers to /health endpoint while doing readiness probe. I want to know how can I still use the /health endpoint instead of /actuator/health. Is there any hook given by springboot 2 to override the default end point. Any help is appreciated.

1 Answers

You can change the path of the actuators like this:

management.endpoints.web.base-path=/

Then you still have /health instead of /actuator/health

But be careful that you don't have path name clashes.

Related