Annotation Type DubboComponentScan
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@Import(DubboComponentScanRegistrar.class)
public @interface DubboComponentScan
Dubbo Component Scan
Annotation,scans the classpath for annotated components that will be auto-registered as
Spring beans. Dubbo-provided Service and Reference.- Since:
- 2.5.7
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>[]Type-safe alternative tobasePackages()for specifying the packages to scan for annotated @Service classes.String[]Base packages to scan for annotated @Service classes.String[]Alias for thebasePackages()attribute.
-
Element Details
-
value
String[] valueAlias for thebasePackages()attribute. Allows for more concise annotation declarations e.g.:@DubboComponentScan("org.my.pkg")instead of@DubboComponentScan(basePackages="org.my.pkg").- Returns:
- the base packages to scan
- Default:
{}
-
basePackages
String[] basePackagesBase packages to scan for annotated @Service classes.value()is an alias for (and mutually exclusive with) this attribute.Use
basePackageClasses()for a type-safe alternative to String-based package names.- Returns:
- the base packages to scan
- Default:
{}
-
basePackageClasses
Class<?>[] basePackageClassesType-safe alternative tobasePackages()for specifying the packages to scan for annotated @Service classes. The package of each class specified will be scanned.- Returns:
- classes from the base packages to scan
- Default:
{}
-