Search code examples
open-libertymicroprofile

Using Eclipse Microprofile NOT on root context (OpenLiberty)


I'm using the eclipse microprofile (2.1) feature on my open liberty. But all functions are running on root path (for example /health). I want to have it on an other context like "/app".

Is it to possible to do a configuration for that (maybe on server.xml)? I couldn't find anything.

Not it is: localhost:8090/health But i want: localhost:8090/app/health


Solution

  • With MicroProfile, the expectation is you're deploying a single application (microservice) per runtime and so it specifies that the endpoints are for the entire runtime. Here's the extract from the latest spec, which now has two health endpoints:

    "The MicroProfile Health Check architecture consists of two /health/ready and /health/live endpoints in a MicroProfile runtime that respectively represent the readiness and the liveness of the entire runtime."

    Consequently, there's not way to control the endpoint. If there's a use case that's broken, I'm sure the MicroProfile and/or Open Liberty communities would be open to changes.