mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Merge pull request #50859 from doehyunbaek
Closes gh-50859 * gh-50859: Polish "Fix placeholder syntax in external config docs" Fix placeholder syntax in external config docs
This commit is contained in:
+1
-1
@@ -859,7 +859,7 @@ Default Values defined in configuration properties are not reflected in the java
|
||||
In the examples above, the `enabled` property of `MyProperties` bound to `my.service` is `false` by default.
|
||||
|
||||
However, `my.service.enabled` is not available in the `Environment` with a value of `false` if no such property is set by the user.
|
||||
Concretely, this prevents you to use `@Value(${"my.service.enabled"})` or `my.service.enabled` as a placeholder in configuration properties without explicitly providing a default.
|
||||
Concretely, this prevents you from using `@Value("${my.service.enabled}")` or `my.service.enabled` as a placeholder in configuration properties without explicitly providing a default.
|
||||
If you need to query the javadoc:org.springframework.core.env.Environment[] for that property, for instance in a javadoc:org.springframework.context.annotation.Condition[] implementation, the default needs to be provided as well.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user