@Target(value=TYPE)
@Retention(value=RUNTIME)
@Documented
public @interface FeignClient
@RibbonClient with the same name (i.e. value) as the feign client.| 限定符和类型 | 可选元素和说明 |
|---|---|
java.lang.Class<?>[] |
configuration
A custom configuration class for the feign client.
|
java.lang.String |
contextId
This will be used as the bean name instead of name if present, but will not be used
as a service id.
|
boolean |
decode404 |
java.lang.Class<?> |
fallback
Fallback class for the specified Feign client interface.
|
java.lang.Class<?> |
fallbackFactory
Define a fallback factory for the specified Feign client interface.
|
java.lang.String |
name |
java.lang.String |
path |
boolean |
primary |
java.lang.String |
qualifier |
java.lang.String |
serviceId
已过时。
use
name instead |
java.lang.String |
url |
java.lang.String |
value
The name of the service with optional protocol prefix.
|
@AliasFor(value="name") public abstract java.lang.String value
name. A name must be specified for all clients, whether or not a url is provided.
Can be specified as property key, eg: ${propertyKey}.public abstract java.lang.String contextId
@AliasFor(value="value") public abstract java.lang.String name
value.public abstract java.lang.String qualifier
@Qualifier value for the feign client.public abstract java.lang.String url
public abstract boolean decode404
public abstract java.lang.Class<?>[] configuration
@Bean definition for the pieces that make up the client, for instance
Decoder, Encoder, Contract.public abstract java.lang.Class<?> fallback
public abstract java.lang.Class<?> fallbackFactory
FeignClient. The fallback factory must be a valid spring bean.