Skip to content

Commit ee291dc

Browse files
committed
Merge branch '2.6.x' into 2.7.x
Closes gh-30112
2 parents ba7ba08 + b86ad89 commit ee291dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,10 @@ NOTE: For YAML files, the brackets need to be surrounded by quotes for the keys
893893
The properties above will bind to a `Map` with `/key1`, `/key2` and `key3` as the keys in the map.
894894
The slash has been removed from `key3` because it was not surrounded by square brackets.
895895

896-
You may also occasionally need to use the bracket notation if your `key` contains a `.` and you are binding to non-scalar value.
896+
When binding to scalar values, keys with `.` in them do not need to be surrounded by `[]`.
897+
Scalar values include enums and all types in the `java.lang` package except for `Object`.
898+
Binding `a.b=c` to `Map<String, String>` will preserve the `.` in the key and return a Map with the entry `{"a.b"="c"}`.
899+
For any other types you need to use the bracket notation if your `key` contains a `.`.
897900
For example, binding `a.b=c` to `Map<String, Object>` will return a Map with the entry `{"a"={"b"="c"}}` whereas `[a.b]=c` will return a Map with the entry `{"a.b"="c"}`.
898901

899902

0 commit comments

Comments
 (0)