Annotation Type P


@Retention(CLASS) @Target(PARAMETER) public @interface P

Names a parameter for a PreAuthorize expression, which refers to it as #name. Needed only when the class is compiled without parameter names; where both exist, this one wins.

@PreAuthorize("#owner == authentication.name")
public Report read(@P("owner") String user) { ... }
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name the expression uses.
  • Element Details

    • value

      String value
      The name the expression uses.