@RegisterProvider
@Dependent
public interface MyClientService {
@GET
@Path("/myService/{id}")
Widget getWidget(@PathParam("id") String id);
}
...
@ApplicationScoped
public class MyBean {
@Inject
@RestClient
MyClientService service;
...
}
| Modifier and Type | Annotation and Description |
|---|---|
| public @interface | RegisterRestClient
A marker annotation to register a rest client at runtime. |
| public @interface | RestClient
Use the RestClient qualifier on an injection to point to indicate that this injection point is meant to use an instance of a Type-Safe Rest Client. |