Allow NestedConfigurationProperty on getters

This commit adds support adding `@NestedConfigurationProperty` on a
getter.

See gh-38844
This commit is contained in:
Jared Bates
2023-12-16 17:56:41 -06:00
committed by Stéphane Nicoll
parent 5d4a777d27
commit 6c8987e0d8
6 changed files with 52 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, ElementType.RECORD_COMPONENT })
@Target({ ElementType.FIELD, ElementType.RECORD_COMPONENT, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Nested