@Target(value={PARAMETER,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Documented public @interface AuthenticationPrincipal
Authentication.getPrincipal()
. This is necessary to signal that the
argument should be resolved to the current user rather than a user that might
be edited on a form.Modifier and Type | Optional Element and Description |
---|---|
boolean |
errorOnInvalidType
True if a
ClassCastException should be thrown
when the current Authentication.getPrincipal() is the incorrect
type. |
public abstract boolean errorOnInvalidType
ClassCastException
should be thrown
when the current Authentication.getPrincipal()
is the incorrect
type. Default is false.