Browse Source

Merge branch '2.7.x' into 3.0.x

Closes gh-36809
pull/37018/head
Andy Wilkinson 3 years ago
parent
commit
24ba267516
  1. 3
      spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc

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

@ -385,7 +385,7 @@ To import these properties, you can add the following to your `application.prope @@ -385,7 +385,7 @@ 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.
TIP: The names of the folders and files 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.
@ -395,6 +395,7 @@ TIP: Configuration tree values can be bound to both string `String` and `byte[]` @@ -395,6 +395,7 @@ TIP: Configuration tree values can be bound to both string `String` and `byte[]`
If you have multiple config trees to import from the same parent folder you can use a wildcard shortcut.
Any `configtree:` location that ends with `/*/` will import all immediate children as config trees.
As with a non-wildcard import, the names of the folders and files under each config tree form the property name.
For example, given the following volume:

Loading…
Cancel
Save