Skip to content

Commit

Permalink
Document list merge restrictions with YAML
Browse files Browse the repository at this point in the history
Closes gh-6911
  • Loading branch information
snicoll committed Apr 12, 2017
1 parent be3b5a9 commit 40f4c89
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,22 @@ with a mutable value, e.g. this will bind to the properties above
}
----

[NOTE]
====
Extra care is required when configuring lists that way as overriding will not work as you
would expect. In the example above, when `my.servers` is redefined in several places, the
individual elements are targeted for override, not the list. To make sure that a
`PropertySource` with higher precedence can override the list, you need to define it as
a single property:
[source,yaml,indent=0]
----
my:
servers: dev.bar.com,foo.bar.com
----
====



[[boot-features-external-config-exposing-yaml-to-spring]]
Expand Down

0 comments on commit 40f4c89

Please sign in to comment.