Remove unneeded NestedConfigurationProperty

Closes gh-33239
This commit is contained in:
Moritz Halbritter
2022-11-18 09:45:55 +01:00
parent b7de4020cb
commit 8048e2d6c2
2 changed files with 0 additions and 4 deletions

View File

@@ -6,12 +6,10 @@
[[native-image.advanced.nested-configuration-properties]]
=== Nested Configuration Properties
Reflection hints are automatically created for configuration properties by the Spring ahead-of-time engine.
Nested configuration properties, however, *must* be annotated with `@NestedConfigurationProperty`, otherwise they won't be detected and will not be bindable.
include::code:MyProperties[]
The example above produces configuration properties for `my.properties.name` and `my.properties.nested.number`.
Without the `@NestedConfigurationProperty` annotation on the `nested` field, the `my.properties.nested.number` property would not be bindable in a native image.
NOTE: Please use public getters and setters, otherwise the properties will not be bindable.