com.alibaba.dubbo.config.spring.context.annotation
Annotation Type DubboComponentScan


@Target(value=TYPE)
@Retention(value=RUNTIME)
@Documented
@Import(value=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
Author:
Mercy
See Also:
Service, Reference

Optional Element Summary
 Class<?>[] basePackageClasses
          Type-safe alternative to basePackages() for specifying the packages to scan for annotated @Service classes.
 String[] basePackages
          Base packages to scan for annotated @Service classes.
 String[] value
          Alias for the basePackages() attribute.
 

value

public abstract String[] value
Alias for the basePackages() 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

public abstract String[] basePackages
Base 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

public abstract Class<?>[] basePackageClasses
Type-safe alternative to basePackages() 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:
{}


Copyright © 2012–2017 Alibaba. All rights reserved.