Quarkus: Configuring Context and Resource Paths

A Quarkus application exposes the JAX-RS resources directly from the "root":

The HelloResource:

public class HelloResource {

    public String hello() {
        return "hello";

is available from: http://localhost:8080/hello

By adding the "servlet" extension with: mvn quarkus:add-extension -Dextension="servlet" the JAX-RS as well as the context path can be configured in src/main/resources/application.properties

The following configuration:


exposes the HelloResource as: http://localhost:8080/quark/resources/hello

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments