Hands-On Enterprise Java Microservices with Eclipse MicroProfile by Cesar Saavedra

Hands-On Enterprise Java Microservices with Eclipse MicroProfile by Cesar Saavedra

Author:Cesar Saavedra [Cesar Saavedra]
Language: eng
Format: epub
Tags: COM005000 - COMPUTERS / Enterprise Applications / General, COM051280 - COMPUTERS / Programming Languages / Java, COM060180 - COMPUTERS / Web / Web Services and APIs
Publisher: Packt Publishing
Published: 2019-08-30T13:28:11+00:00


MicroProfile REST Client CDI usage

MP-RC type-safe interfaces may be injected as CDI beans. The runtime must create a CDI bean for each interface annotated with @RegisterRestClient. A CDI client injects bean created will include a qualifier, @RestClient , to differentiate use as an MP-RC injection point. The following update to our WorldClockApi interface illustrates the use of the @RegisterRestClient annotation:

import javax.ws.rs.GET;

import javax.ws.rs.Path;

import javax.ws.rs.PathParam;

import javax.ws.rs.Produces;

import javax.ws.rs.core.MediaType;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.