Skip navigation links

@Version(value="1.2")

Package org.eclipse.microprofile.rest.client.inject

APIs to aid in CDI-based injection of MP Rest Client implementations.

See: Description

Package org.eclipse.microprofile.rest.client.inject Description

APIs to aid in CDI-based injection of MP Rest Client implementations. These annotations are used both to mark an interface as registered Rest Client and also to designate that an implementation of that interface should be injected at a specific injection point. Example:
 @RegisterProvider
 @Dependent
 public interface MyClientService {
     @GET
     @Path("/myService/{id}")
     Widget getWidget(@PathParam("id") String id);
 }

 ...
 @ApplicationScoped
 public class MyBean {
     @Inject
     @RestClient
     MyClientService service;
     ...
 }
 
Skip navigation links

Copyright © 2020 Eclipse Foundation. All rights reserved.