Search in sources :

Example 1 with CsvMessageConverter

use of com.b2international.snowowl.core.rest.util.CsvMessageConverter in project snow-owl by b2ihealthcare.

the class SnowOwlApiConfig method configureMessageConverters.

@Override
public void configureMessageConverters(final List<HttpMessageConverter<?>> converters) {
    final StringHttpMessageConverter stringConverter = new StringHttpMessageConverter(Charsets.UTF_8);
    stringConverter.setWriteAcceptCharset(false);
    converters.add(stringConverter);
    converters.add(new ByteArrayHttpMessageConverter());
    converters.add(new ResourceHttpMessageConverter());
    converters.add(new CsvMessageConverter());
    // XXX using null value here as Spring calls a proxied method anyway which returns an already configured instance, see mapping2JacksonHttpMessageConverter Bean method
    converters.add(mapping2JacksonHttpMessageConverter(null));
}
Also used : ResourceHttpMessageConverter(org.springframework.http.converter.ResourceHttpMessageConverter) ByteArrayHttpMessageConverter(org.springframework.http.converter.ByteArrayHttpMessageConverter) StringHttpMessageConverter(org.springframework.http.converter.StringHttpMessageConverter) CsvMessageConverter(com.b2international.snowowl.core.rest.util.CsvMessageConverter)

Aggregations

CsvMessageConverter (com.b2international.snowowl.core.rest.util.CsvMessageConverter)1 ByteArrayHttpMessageConverter (org.springframework.http.converter.ByteArrayHttpMessageConverter)1 ResourceHttpMessageConverter (org.springframework.http.converter.ResourceHttpMessageConverter)1 StringHttpMessageConverter (org.springframework.http.converter.StringHttpMessageConverter)1