cn.gitlab.virtualcry.sapjco.spring.context.annotation.EnableJCo Maven / Gradle / Ivy
package cn.gitlab.virtualcry.sapjco.spring.context.annotation;
import org.springframework.context.annotation.Import;
import org.springframework.core.annotation.AliasFor;
import java.lang.annotation.*;
/**
* Enables JCo components as Spring Beans, equals
* {@link JCoComponentScan}.
*
* Note : {@link EnableJCo} must base on Spring Framework 4.2 and above
*
* @author VirtualCry
* @see JCoComponentScan
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@JCoComponentScan
@Import(EnableJCoRegister.class)
public @interface EnableJCo {
/**
* Base packages to scan for annotated @Service classes.
*
* Use {@link #scanBasePackageClasses()} for a type-safe alternative to String-based
* package names.
*
* @return the base packages to scan
* @see JCoComponentScan#basePackages()
*/
@AliasFor(annotation = JCoComponentScan.class, attribute = "basePackages")
String[] scanBasePackages() default {};
/**
* Type-safe alternative to {@link #scanBasePackages()} for specifying the packages to
* scan for annotated @Service classes. The package of each class specified will be
* scanned.
*
* @return classes from the base packages to scan
* @see JCoComponentScan#basePackageClasses
*/
@AliasFor(annotation = JCoComponentScan.class, attribute = "basePackageClasses")
Class>[] scanBasePackageClasses() default {};
}