File tree 1 file changed +6
-5
lines changed
spring-boot-project/spring-boot-docs/src/main/asciidoc
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -978,13 +978,14 @@ name of the bean is used.
978
978
The bean name in the example above is `acme-com.example.AcmeProperties`.
979
979
====
980
980
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
984
984
`@EnableConfigurationProperties` annotation is _also_ automatically applied to your
985
985
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:
988
989
989
990
[source,java,indent=0]
990
991
----
You can’t perform that action at this time.
0 commit comments