Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 730 Bytes

File metadata and controls

31 lines (22 loc) · 730 Bytes

caf-util-dropwizard

This project provides Dropwizard utility code.

caf-substitutor-dropwizard

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);
}