From 8d6f451380a2b97b17bdf56f7916b32b8fd29ce9 Mon Sep 17 00:00:00 2001 From: Filipe Roque Date: Thu, 8 May 2025 17:45:23 +0100 Subject: [PATCH 1/2] Fix typo in ConfigFactory in documentation --- docs/asciidoc/configuration.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/asciidoc/configuration.adoc b/docs/asciidoc/configuration.adoc index 5ff7082029..490d064da9 100644 --- a/docs/asciidoc/configuration.adoc +++ b/docs/asciidoc/configuration.adoc @@ -234,7 +234,7 @@ To skip/ignore Jooby loading and precedence mechanism, just instantiate and set [source,java,role="primary"] ---- { - Config conf = ConfigFatory.load("/path/to/myapp.conf"); <1> + Config conf = ConfigFactory.load("/path/to/myapp.conf"); <1> Environment env = new Env(customConfig, "prod"); <2> setEnvironment(env); <3> } @@ -244,7 +244,7 @@ To skip/ignore Jooby loading and precedence mechanism, just instantiate and set [source,kotlin,role="secondary"] ---- { - val conf = ConfigFatory.load("/path/to/myapp.conf") <1> + val conf = ConfigFactory.load("/path/to/myapp.conf") <1> val env = new Env(conf, "prod") <2> environment = env <3> } From 6e85c34609856cad7ef487703d5b253425acb147 Mon Sep 17 00:00:00 2001 From: Filipe Roque Date: Thu, 8 May 2025 23:45:17 +0100 Subject: [PATCH 2/2] Fix documentation for Custom environment --- docs/asciidoc/configuration.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/asciidoc/configuration.adoc b/docs/asciidoc/configuration.adoc index 490d064da9..0a11740cae 100644 --- a/docs/asciidoc/configuration.adoc +++ b/docs/asciidoc/configuration.adoc @@ -207,8 +207,8 @@ Custom configuration and environment are available too using: [source,java,role="primary"] ---- { - Environment env = setEnvironmentOptions(new EnvOptions() <1> - .setFilename("myapp.conf") + Environment env = setEnvironmentOptions( + new EnvironmentOptions().setFilename("myapp.conf")); <1> ) } ---- @@ -234,9 +234,9 @@ To skip/ignore Jooby loading and precedence mechanism, just instantiate and set [source,java,role="primary"] ---- { - Config conf = ConfigFactory.load("/path/to/myapp.conf"); <1> - Environment env = new Env(customConfig, "prod"); <2> - setEnvironment(env); <3> + Config conf = ConfigFactory.load("myapp.conf"); <1> + Environment env = new Environment(getClassLoader(), conf); <2> + setEnvironment(env); <3> } ---- @@ -244,8 +244,8 @@ To skip/ignore Jooby loading and precedence mechanism, just instantiate and set [source,kotlin,role="secondary"] ---- { - val conf = ConfigFactory.load("/path/to/myapp.conf") <1> - val env = new Env(conf, "prod") <2> + val conf = ConfigFactory.load("myapp.conf") <1> + val env = Environment(classLoader, conf) <2> environment = env <3> } ----