- 
                Notifications
    You must be signed in to change notification settings 
- Fork 41.6k
Description
The Using Configuration Trees section of the reference docs show the following example:
Given this mounted volume:
etc/
  config/
    myapp/
      username
      passwordand this import path:
spring:
  config:
    import: "optional:configtree:/etc/config/"results in these properties:
myapp.username
myapp.password
However, in a more complicated scenario it may not be clear as to the impact of the import path on the resultant properties.
Given this mounted volume:
etc/
  config/
    myapp/
      username
      password
    secret/
      mysecretand this import path:
spring:
  config:
    import: "optional:configtree:/etc/config/"results in these properties:
myapp.username
myapp.password
secret.mysecret
One might think/expect that using an import path of optional:configtree:/etc/config/*/ would instead result in these properties:
myapp.username
myapp.password
mysecret
but it does not.
Proposal
It may be helpful to emphasize the impact of the import path on the resultant properties.
Something simple like this would do:
The folders under the config tree form the property name, so if you have
etc/config/secret/mysecretmounted and you import /etc/config/you'll get
a property namedsecret.mysecret.However, if you import
/etc/config/secretyou'll getmysecret.