This project provides Dropwizard utility code.
This module provides a CafConfigSubstitutor
class that combines secret lookup:
password: ${secret:MY_PASSWORD:-mysecretpassword}
and environment variable lookup capabilities:
applicationName: ${MY_DATABASE_APPNAME:-MyDbAppName}
It can be enabled in a Dropwizard project like this:
@Override
public void initialize(final Bootstrap<MyAppConfiguration> bootstrap)
{
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(
bootstrap.getConfigurationSourceProvider(),
new CafConfigSubstitutor(false, true)));
super.initialize(bootstrap);
}