override.verticle-configuration.adoc Maven / Gradle / Ivy
=== Passing configuration to a verticle
Configuration in the form of JSON can be passed to a verticle at deployment time:
[source,$lang]
----
{@link examples.CoreExamples#example13}
----
This configuration is then available via the {@link io.vertx.core.Context} object or directly using the
{@link io.vertx.core.AbstractVerticle#config()} method. The configuration is returned as a JSON object so you
can retrieve data as follows:
[source,$lang]
----
{@link examples.ConfigurableVerticleExamples#start()}
----
=== Accessing environment variables in a Verticle
Environment variables and system properties are accessible using the Java API:
[source,$lang]
----
{@link examples.CoreExamples#systemAndEnvProperties()}
----