Skip to content

Commit

Permalink
Update docs to reflect rename of @ConfigurationPropertiesDefaultValue
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Apr 16, 2019
1 parent e7455b4 commit 4941217
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ the following example:
import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.ConfigurationPropertyDefaultValue;
import org.springframework.boot.context.properties.DefaultValue;
@ConfigurationProperties("acme")
public class AcmeProperties {
Expand Down Expand Up @@ -1045,7 +1045,7 @@ the following example:
private final List<String> roles;
public Security(String username, String password,
@ConfigurationPropertyDefaultValue("USER") List<String> roles) {
@DefaultValue("USER") List<String> roles) {
this.username = username;
this.password = password;
this.roles = roles;
Expand All @@ -1065,9 +1065,8 @@ the following example:
In this setup one, and only one constructor must be defined with the list of properties
that you wish to bind and not other properties than the ones in the constructor are bound.

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



Expand Down

0 comments on commit 4941217

Please sign in to comment.