From 4366d7880e83d83dab1f03bce1105d3434e329c8 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 4 Apr 2014 08:54:20 +0100 Subject: [PATCH] Fix docos references to @ConfigurationProperties(prefix="...") Fixes gh-629 --- spring-boot-docs/src/main/asciidoc/howto.adoc | 2 +- spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index 72378bae8a8..2eb58d01dd0 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -47,7 +47,7 @@ rules of thumb: {sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[`ServerProperties`] and read from there the available external configuration options. The `@ConfigurationProperties` has a `name` attribute which acts as a prefix to external - properties, thus `ServerProperties` has `name="server"` and its configuration properties + properties, thus `ServerProperties` has `prefix="server"` and its configuration properties are `server.port`, `server.address` etc. In a running Actuator app look at the `configprops` endpoint. * Look for use of `RelaxedEnvironment` to pull configuration values explicitly out of the diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 050e8147e23..e007e3a7023 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -424,7 +424,7 @@ the configuration of your application. For example: [source,java,indent=0] ---- @Component - @ConfigurationProperties(name="connection") + @ConfigurationProperties(prefix="connection") public class ConnectionSettings { private String username; @@ -512,7 +512,7 @@ annotations to your `@ConfigurationProperties` class: [source,java,indent=0] ---- @Component - @ConfigurationProperties(name="connection") + @ConfigurationProperties(prefix="connection") public class ConnectionSettings { @NotNull