}
@Override
protected AppDescriptor configure() {
final DropwizardResourceConfig config = new DropwizardResourceConfig(true);
for (Class<?> provider : providers) {
config.getClasses().add(provider);
}
config.getClasses().add(OptionalQueryParamInjectableProvider.class);
for (Map.Entry<String, Boolean> feature : features.entrySet()) {
config.getFeatures().put(feature.getKey(), feature.getValue());
}
// Add any features (see FeaturesAndProperties)
for (Map.Entry<String, Object> property : properties.entrySet()) {
config.getProperties().put(property.getKey(), property.getValue());
}
// Configure Jackson
final ObjectMapper mapper = getObjectMapperFactory().build();
config.getSingletons().add(new JacksonMessageBodyProvider(mapper, validator));
config.getSingletons().addAll(singletons);
return new LowLevelAppDescriptor.Builder(config).build();
}
};