Quarkus Hello World Web app
Prerequisites
Create project skeleton using Maven:
quarkus create app org.example:quarkus-hello-world \
--extension='resteasy-reactive'
See Creating Your First Application - Quarkus for more info.
Code
package org.example;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/hello")
public class HelloResource {
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
return "Hello, Quarkus!";
}
}