Make @ModelAttribute and @InitBinder reflective
Closes gh-29572
This commit is contained in:
parent
b27735d4a6
commit
5ed4a14e2b
|
|
@ -22,6 +22,8 @@ import java.lang.annotation.Retention;
|
|||
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 @@ import java.lang.annotation.Target;
|
|||
* 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 @@ import java.lang.annotation.Target;
|
|||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Reflective
|
||||
public @interface InitBinder {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import java.lang.annotation.Retention;
|
|||
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 @@ import org.springframework.ui.Model;
|
|||
*
|
||||
* @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 {
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue