输入banner图图片脚本导航/分类

使用Dropwizard(2)-配置分类ConfiguredBundle

class ConnectivityBundle implements ConfiguredBundle<HelloWorldConfiguration> { @Override public void run(HelloWorldConfiguration configuration, Environment environment) throws Exception { //init hystrix config Map<String, Object> hystrixConfig = configuration.getHystrixConfig(); for (final Map.Entry<String, Object> config : hystrixConfig.entrySet()) { ConfigurationManager.getConfigInstance().setProperty(config.getKey(), config.getValue()); System.out.println(config.getKey()); } } @Override public void initialize(Bootstrap<?> bootstrap) { } }

然后,在Application中添加就好了。
com.test.HelloWorldApplication

@Override
public void initialize(Bootstrap<HelloWorldConfiguration> bootstrap) {
    bootstrap.addBundle(new ConnectivityBundle());
}

使用Dropwizard(2)-配置分类ConfiguredBundle

标签:int   htm   使用   err   red   markdown   技术   exce   app