@Target(value=FIELD)
@Retention(value=RUNTIME)
@Documented
@Inherited
public @interface GrpcClient
Channel or subclasses of AbstractStub/gRPC client services.
Annotated fields will be automatically populated by Spring.
Note: Fields that are annotated with this annotation should NOT be annotated with Autowired or
Inject (conflict).
| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String |
value
The name of the grpc client.
|
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.Class<? extends io.grpc.ClientInterceptor>[] |
interceptors
A list of
ClientInterceptors that should be used with this client in addition to the globally defined
ones. |
public abstract java.lang.String value
config options for
this client.
Example: @GrpcClient("myClient") <-> grpc.client.myClient.port=9090
Note: This value might also be used to check the common / alternative names in server certificate, you can
overwrite this value with the security.authorityOverride property.
public abstract java.lang.Class<? extends io.grpc.ClientInterceptor>[] interceptors
ClientInterceptors that should be used with this client in addition to the globally defined
ones. If a bean of the given type exists, it will be used; otherwise a new instance of that class will be created
via no-args constructor.
Note: These interceptors will be applied after the global interceptors. But the interceptors that were applied last, will be called first.