Below you will find pages that utilize the taxonomy term “settings”
Posts
Use Consul's KV store for Dropwizard settings
I wanted to see how hard it would be to get Dropwizard config from Consul’s key value store. Turns out it is very easy to do!
Make sure you’re using Dropwizard >= 0.8.0, this has the SubstitutingSourceProvider that we’re going to use.
Create a default Dropwizard project with the following configuration line in its config.yml:
someSetting: ${settings/someSetting}
Don’t forget to add it to the xxxConfiguration:
@JsonProperty @NotEmpty private String someSetting; Now in the xxxApplication class, register a new ConsulKVSubstitutor in the initialize method: