use of io.dropwizard.forms.MultiPartBundle in project timbuctoo by HuygensING.
the class TimbuctooV4 method initialize.
@Override
public void initialize(Bootstrap<TimbuctooConfiguration> bootstrap) {
// bundles
activeMqBundle = new ActiveMQBundle();
bootstrap.addBundle(activeMqBundle);
bootstrap.addBundle(new MultiPartBundle());
bootstrap.addBundle(new AssetsBundle("/static", "/static", "index.html"));
/*
* Make it possible to use environment variables in the config.
* see: http://www.dropwizard.io/0.9.1/docs/manual/core.html#environment-variables
*/
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(true)));
}
use of io.dropwizard.forms.MultiPartBundle in project irontest by zheng-wang.
the class IronTestApplication method initialize.
@Override
public void initialize(Bootstrap<IronTestConfiguration> bootstrap) {
bootstrap.addBundle(new AssetsBundle("/assets/app", "/ui", "index.htm", "ui"));
bootstrap.addBundle(new AssetsBundle("/META-INF/resources/webjars", "/ui/lib", null, "lib"));
bootstrap.addBundle(new AssetsBundle("/assets/mockserver", "/ui/mockserver", "mockserver.htm", "mockserver"));
bootstrap.addBundle(new AssetsBundle("/assets/common", "/ui/common", null, "common"));
bootstrap.addBundle(jaxWsBundle);
bootstrap.addBundle(new MultiPartBundle());
bootstrap.addBundle(new ViewBundle<IronTestConfiguration>() {
@Override
public Map<String, Map<String, String>> getViewConfiguration(IronTestConfiguration config) {
return config.getViewRendererConfiguration();
}
});
Configuration.setDefaults(new Configuration.Defaults() {
private final JsonProvider jsonProvider = new JacksonJsonProvider();
private final MappingProvider mappingProvider = new JacksonMappingProvider();
@Override
public JsonProvider jsonProvider() {
return jsonProvider;
}
@Override
public MappingProvider mappingProvider() {
return mappingProvider;
}
@Override
public Set<Option> options() {
return EnumSet.noneOf(Option.class);
}
});
// configure the Jackson ObjectMapper used by JAX-RS (Jersey)
ObjectMapper objectMapper = bootstrap.getObjectMapper();
objectMapper.disable(MapperFeature.DEFAULT_VIEW_INCLUSION);
IronTestUtils.addMixInsForWireMock(objectMapper);
}
Aggregations