Annotation Type IntegrationComponentScan
@Retention(RUNTIME) @Target(TYPE) @Documented @Import(IntegrationComponentScanRegistrar.class) public @interface IntegrationComponentScan
Configures component scanning directives for use with
Configuration classes.
Scans for MessagingGateway on interfaces to create GatewayProxyFactoryBeans.
- Since:
- 4.0
- Author:
- Artem Bilan
- See Also:
ComponentScan,MessagingGateway
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>[]basePackageClassesType-safe alternative tobasePackages()for specifying the packages to scan for annotated components.String[]basePackagesBase packages to scan for annotated components.ComponentScan.Filter[]excludeFiltersSpecifies which types are not eligible for component scanning.ComponentScan.Filter[]includeFiltersSpecifies which types are eligible for component scanning.booleanuseDefaultFiltersIndicates whether automatic detection of classes annotated with@MessagingGatewayshould be enabled.String[]valueAlias for thebasePackages()attribute.
-
Element Details
-
value
Alias for thebasePackages()attribute. Allows for more concise annotation declarations e.g.:@IntegrationComponentScan("org.my.pkg")instead of@IntegrationComponentScan(basePackages="org.my.pkg").- Returns:
- the array of 'basePackages'.
- Default:
- {}
-
basePackages
Base packages to scan for annotated components. Thevalue()is an alias for (and mutually exclusive with) this attribute. UsebasePackageClasses()for a type-safe alternative to String-based package names.- Returns:
- the array of 'basePackages'.
- Default:
- {}
-
basePackageClasses
Class<?>[] basePackageClassesType-safe alternative tobasePackages()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.- Returns:
- the array of 'basePackageClasses'.
- Default:
- {}
-
useDefaultFilters
boolean useDefaultFiltersIndicates whether automatic detection of classes annotated with@MessagingGatewayshould be enabled.- Returns:
- the
useDefaultFiltersflag - Since:
- 5.0
- Default:
- true
-
includeFilters
ComponentScan.Filter[] includeFiltersSpecifies which types are eligible for component scanning.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).- Returns:
- the
includeFiltersarray - Since:
- 5.0
- See Also:
excludeFilters()
- Default:
- {}
-
excludeFilters
ComponentScan.Filter[] excludeFiltersSpecifies which types are not eligible for component scanning.- Returns:
- the
excludeFiltersarray - Since:
- 5.0
- See Also:
includeFilters()
- Default:
- {}
-