Support NestedConfigurationProperty for record types

Add ElementType.RECORD_COMPONENT to NestedConfigurationProperty and
implement isMarkedAsNested for RecordParameterPropertyDescriptor.

This will allow nested records to be properly harvested for their
properties.

See gh-41251
This commit is contained in:
Alexis Couvreur
2024-06-26 13:51:38 -04:00
committed by Moritz Halbritter
parent efd1bd18b6
commit 47c8a859ea
6 changed files with 61 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ import org.springframework.boot.context.properties.bind.Nested;
* @author Phillip Webb
* @since 1.2.0
*/
@Target(ElementType.FIELD)
@Target({ ElementType.FIELD, ElementType.RECORD_COMPONENT })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Nested