Update list overriding documentation

Closes gh-11012
pull/10853/merge
Madhura Bhave 7 years ago
parent 88366b75d0
commit 5f5e7e5089

@ -723,22 +723,10 @@ previously:
[NOTE] [NOTE]
==== ====
Extra care is required when configuring lists as shown in the preceding example, as When lists are configured in more than one place, overriding works by replacing the entire list.
overriding does not work as you might expect. In the preceding example, when `my.servers` In the preceding example, when `my.servers` is redefined in several places, the entire list from
is redefined in several places, the individual elements are targeted for overriding, but the `PropertySource` with higher precedence will override any other configuration for that list.
the list itself is not targeted for overriding. To make sure that a `PropertySource` with Both comma-separated lists and yaml lists can be used for completely overriding the contents of the list.
higher precedence can override the list, you need to define it as a single property, as
shown in the following example:
[source,yaml,indent=0]
----
my:
servers: dev.bar.com,foo.bar.com
----
====
[[boot-features-external-config-exposing-yaml-to-spring]] [[boot-features-external-config-exposing-yaml-to-spring]]
==== Exposing YAML as Properties in the Spring Environment ==== Exposing YAML as Properties in the Spring Environment

Loading…
Cancel
Save