Skip to content

Commit cc95f73

Browse files
committed
Clarify relation of import path to resultant properties in configtree import data
Closes gh-29606
1 parent 479a4e6 commit cc95f73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ To import these properties, you can add the following to your `application.prope
386386

387387
You can then access or inject `myapp.username` and `myapp.password` properties from the `Environment` in the usual way.
388388

389+
TIP: The folders under the config tree form the property name.
390+
In the above example, to access the properties as `username` and `password`, you can set `spring.config.import` to `optional:configtree:/etc/config/myapp`.
391+
389392
NOTE: Filenames with dot notation are also correctly mapped.
390393
For example, in the above example, a file named `myapp.username` in `/etc/config` would result in a `myapp.username` property in the `Environment`.
391394

0 commit comments

Comments
 (0)