Harmonize ConfigurationProperties bean name
When `@EnableConfigurationProperties` is defined, Spring Boot automatically registers a bean in the context for each class specified on the annotation. Previously, the name of the bean only included the prefix which leads to conflict if two different classes use the same prefix. This commit changes the bean name structure to be <prefix>-<fqn> where prefix is the prefix used on the annotation and <fqn> the fully qualified name of the target class. Closes gh-4395
This commit is contained in:
@@ -3,8 +3,8 @@ This endpoint is a report on the Spring Boot `@ConfigurationProperties` beans. B
|
||||
this annotation are bound to the `Environment` on startup, so they reflect the
|
||||
externalised configuration of the application. Beans are listed by name. A bean that is
|
||||
added using `@EnableConfigurationProperties` will have a conventional name:
|
||||
`<prefix>.CONFIGURATION_PROPERTIES`, where `<prefix>` is the environment key prefix
|
||||
specified in the `@ConfigurationProperties` annotation.
|
||||
`<prefix>-<fqn>`, where `<prefix>` is the environment key prefix specified in the
|
||||
`@ConfigurationProperties` annotation and <fqn> the fully qualified name of the bean.
|
||||
|
||||
Example curl request:
|
||||
include::{generated}/configprops/curl-request.adoc[]
|
||||
|
||||
Reference in New Issue
Block a user