Skip to content

CAFapi/caf-util-dropwizard

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages