Skip to content

Commit 4941217

Browse files
committed
Update docs to reflect rename of @ConfigurationPropertiesDefaultValue
See gh-8762
1 parent e7455b4 commit 4941217

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ the following example:
10131013
import java.util.List;
10141014
10151015
import org.springframework.boot.context.properties.ConfigurationProperties;
1016-
import org.springframework.boot.context.properties.ConfigurationPropertyDefaultValue;
1016+
import org.springframework.boot.context.properties.DefaultValue;
10171017
10181018
@ConfigurationProperties("acme")
10191019
public class AcmeProperties {
@@ -1045,7 +1045,7 @@ the following example:
10451045
private final List<String> roles;
10461046
10471047
public Security(String username, String password,
1048-
@ConfigurationPropertyDefaultValue("USER") List<String> roles) {
1048+
@DefaultValue("USER") List<String> roles) {
10491049
this.username = username;
10501050
this.password = password;
10511051
this.roles = roles;
@@ -1065,9 +1065,8 @@ the following example:
10651065
In this setup one, and only one constructor must be defined with the list of properties
10661066
that you wish to bind and not other properties than the ones in the constructor are bound.
10671067

1068-
Default values can be specified using `@ConfigurationPropertyDefaultValue` and the same
1069-
conversion service will be applied to coerce the `String` value to the target type of a
1070-
missing property.
1068+
Default values can be specified using `@DefaultValue` and the same conversion service will
1069+
be applied to coerce the `String` value to the target type of a missing property.
10711070

10721071

10731072

0 commit comments

Comments
 (0)