Package br.com.ingenieux.dropwizard.interpolation

Source Code of br.com.ingenieux.dropwizard.interpolation.EnvironmentVariableInterpolationBundle

package br.com.ingenieux.dropwizard.interpolation;

import io.dropwizard.Bundle;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import org.apache.commons.lang.text.StrSubstitutor;

public class EnvironmentVariableInterpolationBundle implements Bundle
{
  @Override
  public void initialize( Bootstrap<?> bootstrap )
  {
    bootstrap.setConfigurationSourceProvider(
        new SubstitutingSourceProvider(
            bootstrap.getConfigurationSourceProvider(),
            new StrSubstitutor( new EnvironmentVariableLookup() )
        )
    );
  }

  @Override
  public void run( Environment environment )
  {

  }
}
TOP

Related Classes of br.com.ingenieux.dropwizard.interpolation.EnvironmentVariableInterpolationBundle

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.