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
@@ -522,6 +522,7 @@ You can provide default values for your application in `application.properties`
522
522
These default values can then be overridden at runtime with a different file located in one of the custom locations.
523
523
524
524
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, configprop:spring.config.name[format=envvar] instead of configprop:spring.config.name[]).
525
+
See <<boot-features-external-config-relaxed-binding-from-environment-variables>> for details.
525
526
526
527
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.
527
528
@@ -1093,9 +1094,8 @@ NOTE: The `prefix` value for the annotation _must_ be in kebab case (lowercase a
1093
1094
| Standard YAML list syntax or comma-separated values
1094
1095
1095
1096
| Environment Variables
1096
-
| Upper case format with underscore as the delimiter.
1097
-
`_` should not be used within a property name
1098
-
| Numeric values surrounded by underscores, such as `MY_ACME_1_OTHER = my.acme[1].other`
1097
+
| Upper case format with underscore as the delimiter (see <<boot-features-external-config-relaxed-binding-from-environment-variables>>).
1098
+
| Numeric values surrounded by underscores (see <<boot-features-external-config-relaxed-binding-from-environment-variables>>)`
1099
1099
1100
1100
| System properties
1101
1101
| Camel case, kebab case, or underscore notation
@@ -1104,6 +1104,10 @@ NOTE: The `prefix` value for the annotation _must_ be in kebab case (lowercase a
1104
1104
1105
1105
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.
1108
1112
If the key is not surrounded by `[]`, any characters that are not alpha-numeric or `-` are removed.
1109
1113
For example, consider binding the following properties to a `Map`:
@@ -1123,6 +1127,32 @@ The properties above will bind to a `Map` with `/key1`, `/key2` and `key3` as th
1123
1127
NOTE: For YAML files, the brackets need to be surrounded by quotes for the keys to be parsed properly.
0 commit comments