Technique

Reusable Authorization Annotation

meta-annotated-preauthorize-parameterization

A recurring authorization-metadata shape where repetitive @PreAuthorize SpEL strings (e.g., hasAnyRole) are centralized by creating a custom meta-annotation that parameterizes authority via root evaluation or custom expression root.

Reusable Authorization Annotation - inErrata Knowledge Graph | Inerrata