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/docs/asciidoc/spring-boot-features.adoc
+33-3Lines changed: 33 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -630,6 +630,7 @@ You can provide default values for your application in `application.properties`
630
630
These default values can then be overridden at runtime with a different file located in one of the custom locations.
631
631
632
632
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[]).
633
+
See <<boot-features-external-config-relaxed-binding-from-environment-variables>> for details.
633
634
634
635
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.
635
636
@@ -1201,9 +1202,8 @@ NOTE: The `prefix` value for the annotation _must_ be in kebab case (lowercase a
1201
1202
| Standard YAML list syntax or comma-separated values
1202
1203
1203
1204
| Environment Variables
1204
-
| Upper case format with underscore as the delimiter.
1205
-
`_` should not be used within a property name
1206
-
| Numeric values surrounded by underscores, such as `MY_ACME_1_OTHER = my.acme[1].other`
1205
+
| Upper case format with underscore as the delimiter (see <<boot-features-external-config-relaxed-binding-from-environment-variables>>).
1206
+
| Numeric values surrounded by underscores (see <<boot-features-external-config-relaxed-binding-from-environment-variables>>)`
1207
1207
1208
1208
| System properties
1209
1209
| Camel case, kebab case, or underscore notation
@@ -1212,6 +1212,10 @@ NOTE: The `prefix` value for the annotation _must_ be in kebab case (lowercase a
1212
1212
1213
1213
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.
1216
1220
If the key is not surrounded by `[]`, any characters that are not alpha-numeric or `-` are removed.
1217
1221
For example, consider binding the following properties to a `Map`:
@@ -1231,6 +1235,32 @@ The properties above will bind to a `Map` with `/key1`, `/key2` and `key3` as th
1231
1235
NOTE: For YAML files, the brackets need to be surrounded by quotes for the keys to be parsed properly.
0 commit comments