I need to add an external route to a Quarkus REST API.
The mentioned route will look something like:
@ApplicationScoped
public class TestRoute
{
@Route(path = "/test")
public void testRoute(RoutingContext routingContext)
{
routingContext.response().end(">>>>>>>>>>>>>>> Test route");
}
}
Implementing the code above in the REST API module, i.e. as a part of the same JAR, works as expected. But doing it in a different maven module, using the Jandex plugin and including it as a dependency in the API module, simply doesn’t work. Meaning that invoking the /test
endpoint raises 404.
Is that supposed to work somehow or I need to implement the additional route in the same module as the API ? In this case, what if I can’t modify the API JAR ?
Many thanks in advance.