Last active
December 4, 2015 07:38
-
-
Save javaeeeee/df2f6a032232bb809ec7 to your computer and use it in GitHub Desktop.
Additions to Dropwizard Configuration file to configure Jersey client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DWGettingStartedConfiguration extends Configuration { | |
| ... | |
| /** | |
| * The URL to access exchange rate API. | |
| */ | |
| @NotEmpty | |
| private String apiURL; | |
| /** | |
| * The key to access exchange rate API. | |
| */ | |
| @NotEmpty | |
| private String apiKey; | |
| /** | |
| * Jersey client default configuration. | |
| */ | |
| @Valid | |
| @NotNull | |
| private JerseyClientConfiguration jerseyClientConfiguration | |
| = new JerseyClientConfiguration(); | |
| /** | |
| * | |
| * @return Jersey Client | |
| */ | |
| @JsonProperty("jerseyClient") | |
| public JerseyClientConfiguration getJerseyClientConfiguration() { | |
| return jerseyClientConfiguration; | |
| } | |
| /** | |
| * A getter for the URL of currency rates the API. | |
| * | |
| * @return the URL of currency rates the API. | |
| */ | |
| @JsonProperty | |
| public String getApiURL() { | |
| return apiURL; | |
| } | |
| /** | |
| * A getter for the API key of currency rates the API. | |
| * | |
| * @return the API key of currency rates the API. | |
| */ | |
| @JsonProperty | |
| public String getApiKey() { | |
| return apiKey; | |
| } | |
| ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment