Vert.x - Main Method

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

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

application {
  mainClassName = "com.mycompany.myvertx.app.Main"
}

Documentation


Powered by ComboStrap