Good morning, I begin with Vertx for java and I want to create the route example so I copy past the lines but it seems there is something wrong in Router.router(vertex) :
The type io.vertx.rxjava.core.Vertx cannot be resolved. It is indirectly referenced from required .class files
- The method router(Vertx) from the type Router refers to the missing type Vertx
Here is my code :
import io.vertx.core.*;
import io.vertx.rxjava.ext.web.*;
import io.vertx.core.http.HttpHeaders;
public class Test extends AbstractVerticle{
@Override
public void start() throws Exception {
Vertx vertx=Vertx.vertx();
Router router = Router.router(vertx);
Route route1 = router.route("localhost:8080/Orsys/").handler(routingContext -> {
HttpServerResponse response = routingContext.response();
response.setChunked(true);
response.write("Orsys\n");
routingContext.vertx().setTimer(5000, tid -> routingContext.next());
});