I have an application written in v4.5.11 that uses, io.vertx.core.Launcher and I'm able to get the json config parsed in the hook afterConfigParsed. With version 5, the Launcher has been replaced by Vert.x.application.Launcher and the hook used before, doesn't exist anymore. Now with the new class, in which hook can I access the parsed json and when does the parser happens?
I have an application written in v4.5.11 that uses, io.vertx.core.Launcher and I'm able to get the json config parsed in the hook afterConfigParsed. With version 5, the Launcher has been replaced by Vert.x.application.Launcher and the hook used before, doesn't exist anymore. Now with the new class, in which hook can I access the parsed json and when does the parser happens?
In Vert.x 4, the VertxLifecycleHooks#afterConfigParsed
method was invoked before starting Vert.x with the verticle config as parameter.
In Vert.x 5, with the application launcher you can override VertxApplicationHooks#beforeStartingVertx
and get the JSON verticle config with hookContext.deploymentOptions().getConfig()
.
io.vertx.launcher.application.VertxApplicationHooks#beforeStartingVertx
orio.vertx.launcher.application.VertxApplicationHooks#createVertxBuilder
– tsegismont Commented Feb 5 at 16:08