From 27a5a408419dbfd678b7daf00fd2ad84fc2d6b83 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Wed, 9 Oct 2019 08:19:25 +0300 Subject: [PATCH] Document the use of config/application.properties Fixes: #4452 --- .../main/asciidoc/application-configuration-guide.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/src/main/asciidoc/application-configuration-guide.adoc b/docs/src/main/asciidoc/application-configuration-guide.adoc index 11874167eb598..ee81d041e7277 100644 --- a/docs/src/main/asciidoc/application-configuration-guide.adoc +++ b/docs/src/main/asciidoc/application-configuration-guide.adoc @@ -357,9 +357,17 @@ You can override these runtime properties with the following mechanisms (in decr 2. using environment variables: * for a runner jar: `export QUARKUS_DATASOURCE_PASSWORD=youshallnotpass ; java -jar target/myapp-runner.jar` * for a native executable: `export QUARKUS_DATASOURCE_PASSWORD=youshallnotpass ; ./target/myapp-runner` +3. using a configuration file placed in `$PWD/config/application.properties` + * By placing an `application.properties` file inside a directory named `config` which resides in the directory where the application runs, any runtime properties defined +in that file will override the default configuration. Furthermore any runtime properties added to this file that were not part of the original `application.properties` file +_will also_ be taken into account. + * This works in the same way for runner jar and the native executable NOTE: Environment variables names are following the conversion rules of link:https://github.com/eclipse/microprofile-config/blob/master/spec/src/main/asciidoc/configsources.asciidoc#default-configsources[Eclipse MicroProfile] +NOTE: The `config/application.properties` features is available in development mode as well. To make use of it, `config/application.properties` needs to be placed inside the build tool's output directory (`target` for Maven and `build` for Gradle). +Keep in mind however that any cleaning operation from the build tool like `mvn clean` or `gradle clean` will remove the `config` directory as well. + === Configuration Profiles Quarkus supports the notion of configuration profiles. These allow you to have multiple configuration in the same file and