- 
                Notifications
    You must be signed in to change notification settings 
- Fork 41.6k
Closed
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: documentationA documentation updateA documentation update
Description
This paragraph is a bit ambiguous and could benefit from some rewording:
Even if the preceding configuration creates a regular bean for
AcmeProperties, we
recommend that@ConfigurationPropertiesonly deal with the environment and, in
particular, does not inject other beans from the context. Having said that, the
@EnableConfigurationPropertiesannotation is also automatically applied to your
project so that any existing bean annotated with@ConfigurationPropertiesis
configured from theEnvironment. You could shortcutMyConfigurationby making sure
AcmePropertiesis already a bean, as shown in the following example:
- Why is this section started with Even if the preceding configuration creates a regular bean for AcmeProperties[...], in particular Even if? It either creates a bean or it doesn't. From memory, merely annotating a POJO with@ConfigurationPropertiesdoes not turn it into a bean. Even if it did, this paragraph should read The preceding configuration creates a regular bean forAcmeProperties
- Then, why is it connected to the next paragraph using Having said that [...]?
- Finally, in You could shortcut MyConfiguration[...], what are we shortcutting? In other words, what is getting shortcut if we annotateMyConfigurationwith@Component? It turns the POJO into a bean, but what is getting shortcut?
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: documentationA documentation updateA documentation update