use of org.glassfish.jersey.server.validation.internal.ValidationBinder in project jersey by jersey.
the class ValidationFeature method configure.
@Override
public boolean configure(final FeatureContext context) {
final Configuration config = context.getConfiguration();
// Validation disabled?
if (PropertiesHelper.isProperty(config.getProperty(ServerProperties.BV_FEATURE_DISABLE))) {
return false;
}
context.register(new ValidationBinder());
// when ServerProperties.BV_SEND_ERROR_IN_RESPONSE is enabled.
if (PropertiesHelper.isProperty(config.getProperty(ServerProperties.BV_SEND_ERROR_IN_RESPONSE)) && config.getProperty(ServerProperties.RESPONSE_SET_STATUS_OVER_SEND_ERROR) == null) {
context.property(ServerProperties.RESPONSE_SET_STATUS_OVER_SEND_ERROR, true);
}
return true;
}
Aggregations