Skip to content

Commit d77f69c

Browse files
committed
Merge pull request spring-projects#16166 from viktoriya-kutsarova
* pr/16166: Polish "Update ambiguous documentation about ConfigurationProperties" Update ambiguous documentation about ConfigurationProperties
2 parents 015de55 + f07de1b commit d77f69c

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
@@ -978,13 +978,14 @@ name of the bean is used.
978978
The bean name in the example above is `acme-com.example.AcmeProperties`.
979979
====
980980

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

989990
[source,java,indent=0]
990991
----

0 commit comments

Comments
 (0)