protected RestClientExceptionMapper defaultExceptionMapper() {
return new RestClientExceptionMapper();
}
protected RestClientFactoryBean defaultRestClientFactoryBean() {
RestClientFactoryBean defaultRestClientFactoryBean = new RestClientFactoryBean();
if (StringUtils.isBlank(address)) {
throw new IllegalArgumentException("Property 'address' is missing");
}
defaultRestClientFactoryBean.setAddress(address);
defaultRestClientFactoryBean.setThreadSafe(true);
defaultRestClientFactoryBean.setInheritHeaders(true);
List<Feature> features = new ArrayList<Feature>();
features.add(new LoggingFeature());
defaultRestClientFactoryBean.setFeatures(features);
List<Object> providers = new ArrayList<Object>(3);
providers.add(getJaxbProvider());
providers.add(getJsonProvider());
providers.add(getExceptionMapper());
defaultRestClientFactoryBean.setProviders(providers);
return defaultRestClientFactoryBean;
}