About
A Main method is one of the two start point of a Vert.x application.
The main method may also be located in a verticle
Articles Related
Example
public static void main(String[] args) {
Vertx vertx = Vertx.vertx();
JsonObject conf = new JsonObject()
.put("key1", "value1")
.put("key2", "value2");
vertx.deployVerticle(
new DatabaseVerticle(),
new DeploymentOptions().setConfig(conf)
)
}
Deployment
- Create a application script or a runnable jar. Example with the gradle application plugin
application {
mainClassName = "com.mycompany.myvertx.app.Main"
}