Based on my understanding, the HandleHttpRequest.java
servlet configuration currently uses the path "/"
as the base. If we change this to "/api/"
, then all API endpoints will be handled under the /api/
path, meaning requests like /api/yourendpoint
will be routed correctly by default.
final ServletContextHandler handler = new ServletContextHandler();
handler.addServlet(standardServlet, "/");
server.setHandler(handler);
this.server = server;
server.start();