/** * Exposes a Vert.x instance as a Spring bean. * <p> * This method creates new Vert.x default options and invokes * {@link VertxProperties#configureVertx(VertxOptions)} on the object returned * by {@link #vertxProperties()}. * * @return The Vert.x instance. */ @Bean public Vertx vertx() { return Vertx.vertx(vertxProperties().configureVertx(new VertxOptions())); }
/** * Exposes a Vert.x instance as a Spring bean. * * @return The Vert.x instance. */ @Bean public Vertx vertx() { final VertxOptions options = new VertxOptions() .setWarningExceptionTime(1500000000) .setAddressResolverOptions(new AddressResolverOptions() .setCacheNegativeTimeToLive(0) // discard failed DNS lookup results immediately .setCacheMaxTimeToLive(0) // support DNS based service resolution .setQueryTimeout(1000)); vertxProperties().configureVertx(options); return Vertx.vertx(options); }