Skip to content

Commit 628e441

Browse files
committed
Merge branch '2.1.x'
2 parents a44a55e + d77f69c commit 628e441

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -1009,13 +1009,14 @@ name of the bean is used.
10091009
The bean name in the example above is `acme-com.example.AcmeProperties`.
10101010
====
10111011

1012-
Even if the preceding configuration creates a regular bean for `AcmeProperties`, we
1013-
recommend that `@ConfigurationProperties` only deal with the environment and, in
1014-
particular, does not inject other beans from the context. Having said that, the
1012+
The preceding configuration creates a regular bean for `AcmeProperties`. We recommend that
1013+
`@ConfigurationProperties` only deal with the environment and, in particular, does not
1014+
inject other beans from the context. Keep in mind that the
10151015
`@EnableConfigurationProperties` annotation is _also_ automatically applied to your
10161016
project so that any _existing_ bean annotated with `@ConfigurationProperties` is
1017-
configured from the `Environment`. You could shortcut `MyConfiguration` by making sure
1018-
`AcmeProperties` is already a bean, as shown in the following example:
1017+
configured from the `Environment`. Instead of annotating `MyConfiguration` with
1018+
`@EnableConfigurationProperties(AcmeProperties.class)`, you could make `AcmeProperties`
1019+
a bean, as shown in the following example:
10191020

10201021
[source,java,indent=0]
10211022
----

0 commit comments

Comments
 (0)