From b5dd5215f3e667d99dc6fbae10911ec2d015b81a Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 11 Sep 2026 16:59:01 +0100 Subject: [PATCH] Polish "Resolve property placeholders in constructor binding default values" See gh-51661 Signed-off-by: Andy Wilkinson --- .../modules/reference/pages/features/external-config.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc index 1f3ab5cec2d..7884401d8fb 100644 --- a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc +++ b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc @@ -884,7 +884,7 @@ TIP: To use a reserved keyword in the name of a property, such as `my.service.im ==== @DefaultValue and Binding Default values can be specified using javadoc:org.springframework.boot.context.properties.bind.DefaultValue[format=annotation] on constructor parameters and record components. -The conversion service will be applied to coerce the annotation's javadoc:java.lang.String[] value to the target type of a missing property. +Property placeholders in the annotation's javadoc:java.lang.String[] value are replaced and the conversion service is applied to coerce it to the target type of a missing property. In the `MyProperties` example above, you can see the nested `Security` class uses `@DefaultValue("USER")` for the `roles` parameter. This means that if `security` properties are defined, but `roles` is not, the default of `"USER"` will be bound.