Search in sources :

Example 1 with CouchDbMappingJacksonHttpMessageConverter

use of com.springone.myrestaurants.web.CouchDbMappingJacksonHttpMessageConverter in project spring-data-document-examples by spring-projects.

the class CouchDbConfig method restTemplate.

@Bean
public RestTemplate restTemplate() {
    RestTemplate restTemplate = new RestTemplate();
    List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>();
    //converters.add(new MappingJacksonHttpMessageConverter());
    converters.add(new CouchDbMappingJacksonHttpMessageConverter());
    restTemplate.setMessageConverters(converters);
    return restTemplate;
}
Also used : RestTemplate(org.springframework.web.client.RestTemplate) ArrayList(java.util.ArrayList) MappingJacksonHttpMessageConverter(org.springframework.http.converter.json.MappingJacksonHttpMessageConverter) CouchDbMappingJacksonHttpMessageConverter(com.springone.myrestaurants.web.CouchDbMappingJacksonHttpMessageConverter) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) CouchDbMappingJacksonHttpMessageConverter(com.springone.myrestaurants.web.CouchDbMappingJacksonHttpMessageConverter) Bean(org.springframework.context.annotation.Bean)

Aggregations

CouchDbMappingJacksonHttpMessageConverter (com.springone.myrestaurants.web.CouchDbMappingJacksonHttpMessageConverter)1 ArrayList (java.util.ArrayList)1 Bean (org.springframework.context.annotation.Bean)1 HttpMessageConverter (org.springframework.http.converter.HttpMessageConverter)1 MappingJacksonHttpMessageConverter (org.springframework.http.converter.json.MappingJacksonHttpMessageConverter)1 RestTemplate (org.springframework.web.client.RestTemplate)1