Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
49412173
Commit
49412173
authored
Apr 16, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs to reflect rename of @ConfigurationPropertiesDefaultValue
See gh-8762
parent
e7455b45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+4
-5
No files found.
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
49412173
...
@@ -1013,7 +1013,7 @@ the following example:
...
@@ -1013,7 +1013,7 @@ the following example:
import java.util.List;
import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.
ConfigurationProperty
DefaultValue;
import org.springframework.boot.context.properties.DefaultValue;
@ConfigurationProperties("acme")
@ConfigurationProperties("acme")
public class AcmeProperties {
public class AcmeProperties {
...
@@ -1045,7 +1045,7 @@ the following example:
...
@@ -1045,7 +1045,7 @@ the following example:
private final List<String> roles;
private final List<String> roles;
public Security(String username, String password,
public Security(String username, String password,
@
ConfigurationProperty
DefaultValue("USER") List<String> roles) {
@DefaultValue("USER") List<String> roles) {
this.username = username;
this.username = username;
this.password = password;
this.password = password;
this.roles = roles;
this.roles = roles;
...
@@ -1065,9 +1065,8 @@ the following example:
...
@@ -1065,9 +1065,8 @@ the following example:
In this setup one, and only one constructor must be defined with the list of properties
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.
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
Default values can be specified using `@DefaultValue` and the same conversion service will
conversion service will be applied to coerce the `String` value to the target type of a
be applied to coerce the `String` value to the target type of a missing property.
missing property.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment