Skip to content

Commit 4366d78

Browse files
author
Dave Syer
committed
Fix docos references to @ConfigurationProperties(prefix="...")
Fixes gh-629
1 parent cc4ee65 commit 4366d78

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ rules of thumb:
4747
{sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[`ServerProperties`]
4848
and read from there the available external configuration options. The
4949
`@ConfigurationProperties` has a `name` attribute which acts as a prefix to external
50-
properties, thus `ServerProperties` has `name="server"` and its configuration properties
50+
properties, thus `ServerProperties` has `prefix="server"` and its configuration properties
5151
are `server.port`, `server.address` etc. In a running Actuator app look at the
5252
`configprops` endpoint.
5353
* Look for use of `RelaxedEnvironment` to pull configuration values explicitly out of the

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ the configuration of your application. For example:
424424
[source,java,indent=0]
425425
----
426426
@Component
427-
@ConfigurationProperties(name="connection")
427+
@ConfigurationProperties(prefix="connection")
428428
public class ConnectionSettings {
429429
430430
private String username;
@@ -512,7 +512,7 @@ annotations to your `@ConfigurationProperties` class:
512512
[source,java,indent=0]
513513
----
514514
@Component
515-
@ConfigurationProperties(name="connection")
515+
@ConfigurationProperties(prefix="connection")
516516
public class ConnectionSettings {
517517
518518
@NotNull

0 commit comments

Comments
 (0)