Skip to content

Commit

Permalink
Merge branch '2.6.x' into 2.7.x
Browse files Browse the repository at this point in the history
Closes gh-29979
  • Loading branch information
mbhave committed Feb 23, 2022
2 parents d43c4e9 + 894860c commit 0ecf43d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ To import these properties, you can add the following to your `application.prope

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

TIP: The folders under the config tree form the property name.
In the above example, to access the properties as `username` and `password`, you can set `spring.config.import` to `optional:configtree:/etc/config/myapp`.

NOTE: Filenames with dot notation are also correctly mapped.
For example, in the above example, a file named `myapp.username` in `/etc/config` would result in a `myapp.username` property in the `Environment`.

Expand Down

0 comments on commit 0ecf43d

Please sign in to comment.