diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/InitBinder.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/InitBinder.java index 370b2f2801e0..c262653d87af 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/InitBinder.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/InitBinder.java @@ -22,6 +22,8 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.springframework.aot.hint.annotation.Reflective; + /** * Annotation that identifies methods that initialize the * {@link org.springframework.web.bind.WebDataBinder} which @@ -47,6 +49,7 @@ * or {@link java.util.Locale}, allowing to register context-specific editors. * * @author Juergen Hoeller + * @author Sebastien Deleuze * @since 2.5 * @see ControllerAdvice * @see org.springframework.web.bind.WebDataBinder @@ -55,6 +58,7 @@ @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented +@Reflective public @interface InitBinder { /** diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/ModelAttribute.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/ModelAttribute.java index 3316065a0760..fa3893153850 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/ModelAttribute.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/ModelAttribute.java @@ -22,6 +22,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.springframework.aot.hint.annotation.Reflective; import org.springframework.core.annotation.AliasFor; import org.springframework.ui.Model; @@ -60,12 +61,14 @@ * * @author Juergen Hoeller * @author Rossen Stoyanchev + * @author Sebastien Deleuze * @since 2.5 * @see ControllerAdvice */ @Target({ElementType.PARAMETER, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented +@Reflective public @interface ModelAttribute { /**