@Retention(value=RUNTIME) @Target(value=TYPE) @Documented @Import(value=org.springframework.cloud.openfeign.FeignClientsRegistrar.class) public @interface EnableFeignClients
FeignClient @FeignClient).
Configures component scanning directives for use with
Configuration
@Configuration classes.| Modifier and Type | Optional Element and Description |
|---|---|
Class<?>[] |
basePackageClasses
Type-safe alternative to
basePackages() for specifying the packages to
scan for annotated components. |
String[] |
basePackages
Base packages to scan for annotated components.
|
Class<?>[] |
clients
List of classes annotated with @FeignClient.
|
Class<?>[] |
defaultConfiguration
A custom
@Configuration for all feign clients. |
String[] |
value
Alias for the
basePackages() attribute. |
public abstract String[] value
basePackages() attribute. Allows for more concise annotation
declarations e.g.: @ComponentScan("org.my.pkg") instead of
@ComponentScan(basePackages="org.my.pkg").public abstract String[] basePackages
value() is an alias for (and mutually exclusive with) this attribute.
Use basePackageClasses() for a type-safe alternative to String-based
package names.
public abstract Class<?>[] basePackageClasses
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.
public abstract Class<?>[] defaultConfiguration
@Configuration for all feign clients. Can contain override
@Bean definition for the pieces that make up the client, for instance
Decoder, Encoder, Contract.for the defaultspublic abstract Class<?>[] clients
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.