Class SecurityAnnotationScanners
java.lang.Object
org.springframework.security.core.annotation.SecurityAnnotationScanners
Factory for creating
SecurityAnnotationScanner instances.- Since:
- 6.4
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends Annotation>
SecurityAnnotationScanner<A>requireUnique(Class<A> type) Create aSecurityAnnotationScannerthat requires synthesized annotations to be unique on the givenAnnotatedElement.static <A extends Annotation>
SecurityAnnotationScanner<A>requireUnique(Class<A> type, AnnotationTemplateExpressionDefaults templateDefaults) Create aSecurityAnnotationScannerthat requires synthesized annotations to be unique on the givenAnnotatedElement.static SecurityAnnotationScanner<Annotation>requireUnique(List<Class<? extends Annotation>> types) Create aSecurityAnnotationScannerthat requires synthesized annotations to be unique on the givenAnnotatedElement.
-
Method Details
-
requireUnique
Create aSecurityAnnotationScannerthat requires synthesized annotations to be unique on the givenAnnotatedElement.- Type Parameters:
A- the annotation type- Parameters:
type- the annotation type- Returns:
- the default
SecurityAnnotationScanner
-
requireUnique
public static <A extends Annotation> SecurityAnnotationScanner<A> requireUnique(Class<A> type, AnnotationTemplateExpressionDefaults templateDefaults) Create aSecurityAnnotationScannerthat requires synthesized annotations to be unique on the givenAnnotatedElement.When a
AnnotationTemplateExpressionDefaultsis provided, it will return a scanner that supports placeholders in the annotation's attributes in addition to the meta-annotation synthesizing provided byrequireUnique(Class).- Type Parameters:
A- the annotation type- Parameters:
type- the annotation typetemplateDefaults- the defaults for resolving placeholders in the annotation's attributes- Returns:
- the default
SecurityAnnotationScanner
-
requireUnique
public static SecurityAnnotationScanner<Annotation> requireUnique(List<Class<? extends Annotation>> types) Create aSecurityAnnotationScannerthat requires synthesized annotations to be unique on the givenAnnotatedElement. Supplying multiple types implies that the synthesized annotation must be unique across all specified types.- Parameters:
types- the annotation types- Returns:
- the default
SecurityAnnotationScanner
-