@Retention(value=RUNTIME) @Target(value=TYPE) @Documented @Import(value=IntegrationComponentScanRegistrar.class) public @interface IntegrationComponentScan
Configuration
classes.
Scans for MessagingGateway
on interfaces to create GatewayProxyFactoryBean
s.
ComponentScan
,
MessagingGateway
Modifier and Type | Optional Element and Description |
---|---|
Class<?>[] |
basePackageClasses
Type-safe alternative to
basePackages() for specifying the packages to
scan for annotated components. |
String[] |
basePackages
Base packages to scan for annotated components.
|
ComponentScan.Filter[] |
excludeFilters
Specifies which types are not eligible for component scanning.
|
ComponentScan.Filter[] |
includeFilters
Specifies which types are eligible for component scanning.
|
boolean |
useDefaultFilters
Indicates whether automatic detection of classes annotated with
@MessagingGateway should be enabled. |
String[] |
value
Alias for the
basePackages() attribute. |
@AliasFor(value="basePackages") public abstract String[] value
basePackages()
attribute.
Allows for more concise annotation declarations e.g.:
@IntegrationComponentScan("org.my.pkg")
instead of
@IntegrationComponentScan(basePackages="org.my.pkg")
.@AliasFor(value="value") public abstract String[] basePackages
value()
is an alias
for (and mutually exclusive with) this attribute. Use basePackageClasses()
for a type-safe alternative to String-based package names.public abstract Class<?>[] basePackageClasses
basePackages()
for specifying the packages to
scan for annotated components. The package of each class specified will be scanned.
Consider creating a special no-op marker class or interface in each package that
serves no purpose other than being referenced by this attribute.public abstract boolean useDefaultFilters
@MessagingGateway
should be enabled.useDefaultFilters
flagpublic abstract ComponentScan.Filter[] includeFilters
Further narrows the set of candidate components from everything in
basePackages()
to everything in the base packages that matches the given
filter or filters.
Note that these filters will be applied in addition to the default filters, if
specified. Any type under the specified base packages which matches a given filter
will be included, even if it does not match the default filters (i.e. is not
annotated with @MessagingGateway
).
includeFilters
arrayexcludeFilters()
public abstract ComponentScan.Filter[] excludeFilters
excludeFilters
arrayincludeFilters()