private Map<String, RestError> exceptionMappings = Collections.emptyMap();
public DefaultExceptionMapper() {
//should be cleaner, but this is fine for a demo:
InputStream is = ClassUtils.getResourceAsStream("restErrors.properties");
OrderPreservingProperties props = new OrderPreservingProperties();
props.load(is);
this.exceptionMappings = toRestErrors(props);
}