Skip to content

Commit 7105592

Browse files
committed
Polish "Fix bean name by adding sample class with prefix"
See gh-34029
1 parent 0a30071 commit 7105592

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ include::code:MyApplication[]
770770
When the `@ConfigurationProperties` bean is registered using configuration property scanning or through `@EnableConfigurationProperties`, the bean has a conventional name: `<prefix>-<fqn>`, where `<prefix>` is the environment key prefix specified in the `@ConfigurationProperties` annotation and `<fqn>` is the fully qualified name of the bean.
771771
If the annotation does not provide any prefix, only the fully qualified name of the bean is used.
772772
773-
The bean name in the example above is `some.properties-com.example.app.SomeProperties`.
773+
Assuming that it is in the `com.example.app` package, the bean name of the `SomeProperties` example above is `some.properties-com.example.app.SomeProperties`.
774774
====
775775

776776
We recommend that `@ConfigurationProperties` only deal with the environment and, in particular, does not inject other beans from the context.

0 commit comments

Comments
 (0)