Skip to content

Commit

Permalink
Update propertySource.adoc (#11242)
Browse files Browse the repository at this point in the history
Further explain micronaut.config.files usage
  • Loading branch information
jdeex authored Oct 8, 2024
1 parent 12e0ed5 commit 468a418
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/docs/guide/config/propertySource.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ Micronaut framework by default contains `PropertySourceLoader` implementations t
. Properties from `MICRONAUT_APPLICATION_JSON`
. Java System Properties
. OS environment variables
. Configuration files loaded in order from the system property 'micronaut.config.files' or the environment variable `MICRONAUT_CONFIG_FILES`. The value can be a comma-separated list of paths with the last file having precedence. The files can be referenced from the file system as a path, or the classpath with a `classpath:` prefix.
. Configuration files loaded in order from the system property 'micronaut.config.files' or the environment variable `MICRONAUT_CONFIG_FILES`. The value can be a comma-separated list of paths with the last file having precedence. The files can be referenced from:
.. the file system as an absolute path (without any prefix),
.. the classpath with a `classpath:` prefix.
. Environment-specific properties from `application-{environment}.{extension}`
. Application-specific properties from `application.{extension}`

NOTE: 'micronaut.config.files' will be ignored in bootstrap.yml or application.yml. Loading additional configuration files from a configuration file is not supported

TIP: `.properties`, `.json`, `.yml` are supported out of the box. For Groovy users `.groovy` is supported as well.

Note that if you want full control of where your application loads configuration from you can disable the default `PropertySourceLoader` implementations listed above by calling the `enableDefaultPropertySources(false)` method of the api:context.ApplicationContextBuilder[] interface when starting your application.
Expand Down

0 comments on commit 468a418

Please sign in to comment.