commit | author | age
|
93575e
|
1 |
package com.redhat.restclient; |
MC |
2 |
|
|
3 |
import org.eclipse.microprofile.rest.client.inject.RestClient; |
|
4 |
|
|
5 |
import javax.inject.Inject; |
|
6 |
import javax.ws.rs.Consumes; |
|
7 |
import javax.ws.rs.GET; |
|
8 |
import javax.ws.rs.Path; |
|
9 |
import javax.ws.rs.Produces; |
|
10 |
import javax.ws.rs.core.MediaType; |
|
11 |
import java.util.List; |
|
12 |
|
4ee09a
|
13 |
@Path("/currencies") |
93575e
|
14 |
@Produces(MediaType.APPLICATION_JSON) |
MC |
15 |
@Consumes(MediaType.APPLICATION_JSON) |
|
16 |
public class CurrencyResource { |
|
17 |
|
|
18 |
@Inject |
|
19 |
@RestClient |
4ee09a
|
20 |
CurrencyService currencies; |
93575e
|
21 |
|
MC |
22 |
@GET |
4ee09a
|
23 |
public List<String> getCurrencyNames() { |
MC |
24 |
return currencies.getCurrencyNames(); |
93575e
|
25 |
} |
4ee09a
|
26 |
|
MC |
27 |
} |