You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+33-3Lines changed: 33 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -504,6 +504,7 @@ You can provide default values for your application in `application.properties`
504
504
These default values can then be overridden at runtime with a different file located in one of the custom locations.
505
505
506
506
NOTE: If you use environment variables rather than system properties, most operating systems disallow period-separated key names, but you can use underscores instead (for example, `SPRING_CONFIG_NAME` instead of `spring.config.name`).
507
+
See <<boot-features-external-config-relaxed-binding-from-environment-variables>> for details.
507
508
508
509
NOTE: If your application runs in a container, then JNDI properties (in `java:comp/env`) or servlet context initialization parameters can be used instead of, or as well as, environment variables or system properties.
509
510
@@ -978,9 +979,8 @@ NOTE: The `prefix` value for the annotation _must_ be in kebab case (lowercase a
978
979
| Standard YAML list syntax or comma-separated values
979
980
980
981
| Environment Variables
981
-
| Upper case format with underscore as the delimiter.
982
-
`_` should not be used within a property name
983
-
| Numeric values surrounded by underscores, such as `MY_ACME_1_OTHER = my.acme[1].other`
982
+
| Upper case format with underscore as the delimiter (see <<boot-features-external-config-relaxed-binding-from-environment-variables>>).
983
+
| Numeric values surrounded by underscores (see <<boot-features-external-config-relaxed-binding-from-environment-variables>>)`
984
984
985
985
| System properties
986
986
| Camel case, kebab case, or underscore notation
@@ -989,6 +989,10 @@ NOTE: The `prefix` value for the annotation _must_ be in kebab case (lowercase a
989
989
990
990
TIP: We recommend that, when possible, properties are stored in lower-case kebab format, such as `my.property-name=acme`.
When binding to `Map` properties, if the `key` contains anything other than lowercase alpha-numeric characters or `-`, you need to use the bracket notation so that the original value is preserved.
993
997
If the key is not surrounded by `[]`, any characters that are not alpha-numeric or `-` are removed.
994
998
For example, consider binding the following properties to a `Map`:
@@ -1008,6 +1012,32 @@ The properties above will bind to a `Map` with `/key1`, `/key2` and `key3` as th
1008
1012
NOTE: For YAML files, the brackets need to be surrounded by quotes for the keys to be parsed properly.
0 commit comments