org.zodiac.autoconfigure.feign.dubbo.proxy.EnableFeignProviderProxies Maven / Gradle / Ivy
package org.zodiac.autoconfigure.feign.dubbo.proxy;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Indexed;
import org.zodiac.autoconfigure.web.remote.smart.EnableSmartRequestMapping;
import java.lang.annotation.*;
/**
* Scans for interfaces that declare they are feign clients (via {@link FeignClient}).
* Configures component scanning directives for use with
* {@link org.springframework.context.annotation.Configuration} or
* {@link org.springframework.boot.SpringBootConfiguration}classes.
*
* To see Implementation simulated of refer: org.springframework.cloud.openfeign.EnableFeignClients
.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Indexed
@EnableSmartRequestMapping
@Import(value = {FeignProviderProxiesRegistrar.class, FeignProxyWebFluxConfiguration.class, FeignProxyWebMvcConfiguration.class/*, FeignContextAutoConfiguration.class*/ })
public @interface EnableFeignProviderProxies {
/**
* Alias for the {@link #basePackages()} attribute. Allows for more concise annotation declarations e.g.:
* {@code @ComponentScan("org.my.pkg")} instead of {@code @ComponentScan(basePackages="org.my.pkg")}.
*
* @return the array of 'basePackages'.
*/
String[] value() default {};
/**
* Base packages to scan for annotated components.
*
* {@link #value()} is an alias for (and mutually exclusive with) this attribute.
*
* Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names.
*
* @return the array of 'basePackages'.
*/
String[] basePackages() default {};
/**
* Type-safe alternative to {@link #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.
*
* @return the array of 'basePackageClasses'.
*/
Class>[] basePackageClasses() default {};
/**
* List of classes annotated with {@code @FeignClient}. If not empty, disables classpath scanning.
*
* @return annotated classes
*/
Class>[] clients() default {};
Class> superClass() default Void.class;
}