Eclipse Vert.x cheat sheet
English
About
Applications using Eclipse Vert.x are fast, responsive, resilient, and elastic. They are event-driven, nonblocking, and can run on top of the Java Virtual Machine while offering many language choices.
In this cheat sheet, author Clement Escoffier provides step-by-step details to let you create your apps the way you want to. Learn about:
- Programming with Vert.x
- Reactive Systems
- Creating apps with Apache Maven, Gradle, and Vert.x CLI
- Verticles
- EventBus
- And more…
Excerpt
2.A Create a Vert.x application with Apache Maven
CommandDescription
# Linux and MacOSgit clone https://github.com/vert-x3/vertx-maven-starter.git PROJECT_NAMEcd PROJECT_NAME./redeploy.sh# Windowsgit clone https://github.com/vert-x3/vertx-maven-starter.git PROJECT_NAMEcd PROJECT_NAMEredeploy.batGenerate and Run
It generates the project structure and start the application in redeploy mode: your changes recompile and restart the application. The started application is accessible from http://localhost:8080
It generates the project structure and start the application in redeploy mode: your changes recompile and restart the application. The started application is accessible from http://localhost:8080
mvn packagePackage
An executable fat jar is created in the target directory.
An executable fat jar is created in the target directory.
Add the dependency in the
pom.xml fileDependency management
Add the dependency in the pom.xml file
Add the dependency in the pom.xml file
Import the project as a Maven project in your favorite IDE
IDE support
2.B Create a Vert.x application with Gradle
git clone https://github.com/vert-x3Generate and Run