Search code examples
restvaadinquarkusvaadin23

How to add Rest API endpoint in Vaadin application running with Quarkus


I have Vaadin v23.x on Quarkus application forked from: https://github.com/vaadin/base-starter-flow-quarkus/

I need to have a simple API endpoint as well

@Path("/hello")
public class GreetingResource {

  @GET
  @Produces(MediaType.TEXT_PLAIN)
  public String hello() {
    return "Hello from RESTEasy Reactive";
  }
}

Right now when I am loading http://localhost:8080/hello I am getting Vaadin error.

Error msg

Does someone know how to fix this?


Solution

  • To fix this problem configure quarkus.resteasy.path in application.propertie

    For example: quarkus.resteasy.path=/api

    And then API will be available at the URL: http://localhost:8080/api/hello