Polish "Support @Name with JavaBean-based configuration properties"

See gh-39452
This commit is contained in:
Andy Wilkinson
2024-07-22 15:40:14 +01:00
parent a305e2d1bd
commit 23b344691d
11 changed files with 181 additions and 71 deletions

View File

@@ -713,6 +713,8 @@ The preceding POJO defines the following properties:
* `my.service.security.password`.
* `my.service.security.roles`, with a collection of `String` that defaults to `USER`.
TIP: To use a reserved keyword in the name of a property, such as `my.service.import`, use the `@Name` annotation on the property's field.
NOTE: The properties that map to `@ConfigurationProperties` classes available in Spring Boot, which are configured through properties files, YAML files, environment variables, and other mechanisms, are public API but the accessors (getters/setters) of the class itself are not meant to be used directly.
[NOTE]