Closed RaviH closed 6 years ago
Figured it out. Posting here for posterity:
public class VertxExmbedded {
public static void main(String[] args) {
Vertx vertx = Vertx.vertx();
vertx.runOnContext(aVoid -> {
// Set up the jersey configuration
// The minimum config required is a package to inspect for JAX-RS endpoints
vertx.getOrCreateContext().config()
.put("jersey", new JsonObject()
.put("port", 8080)
.put("base_path", "/videocatalogmiddle")
.put("resources", new JsonArray().add("com.charter.aesd.videocatalog")));
final Injector injector = Guice.createInjector(new CustomBinder(vertx));
final GuiceJerseyServer guiceJerseyServer = injector.getInstance(GuiceJerseyServer.class);
guiceJerseyServer.start();
});
}
}
Hi,
I am trying to figure out how to start the app/service via a main class.
Below is what I have and it's not working. What am I missing?