Home > Blockchain >  How to point a single spring actuator endpoint to the root ("/")
How to point a single spring actuator endpoint to the root ("/")

Time:07-23

I have a requirement to expose a health endpoint on the root path on the specific port.

However, root path is reserved for the actuator endpoints overview and I could not find a way to overwrite that overview functionality with the specific endpoint functionality.

This DOES NOT work:

management.endpoints.web.base-path=/
management.endpoints.web.path-mapping.health=""

As a workaround, I created a rest controller which redirects "/" to "/actuator/health". But it looks ugly. Does anybody know a better solution?

CodePudding user response:

After conversations with multiple engineers, it seems like my solution with redirect is the only possible one.

  • Related