Annotation Interface ComponentScan.Filter
- 封闭类:
- ComponentScan
Declares the type filter to be used as an include filter or exclude filter.
-
可选元素概要
可选元素
-
元素详细资料
-
type
FilterType typeThe type of filter to use.Default is
FilterType.ANNOTATION.- 默认值:
- ANNOTATION
-
value
Alias forclasses().- 另请参阅:
- 默认值:
- {}
-
classes
The class or classes to use as the filter.The following table explains how the classes will be interpreted based on the configured value of the
type()attribute.FilterTypeClass Interpreted As ANNOTATIONthe annotation itself ASSIGNABLE_TYPEthe type that detected components should be assignable to CUSTOMan implementation of TypeFilterWhen multiple classes are specified, OR logic is applied — for example, "include types annotated with
@FooOR@Bar".Custom
TypeFiltersmay optionally implement any of the followingAwareinterfaces, and their respective methods will be called prior tomatch:Specifying zero classes is permitted but will have no effect on component scanning.
- 默认值:
- {}
-
pattern
String[] patternThe pattern (or patterns) to use for the filter, as an alternative to specifying a Classvalue().If
type()is set toREGEX, this is a regex pattern for the fully-qualified class names to match.- 默认值:
- {}
-