After half a day googling I have managed to register a custom HttpMessageConverter over the configuration class. Like this:
@Configuration
public class WebConfig extends WebMvcConfigurationSupport {
@Bean
@Override
public RequestMappingHandlerAdapter requestMappingHandlerAdapter() {
RequestMappingHandlerAdapter handlerAdapter = super.requestMappingHandlerAdapter();
handlerAdapter.getMessageConverters().add(0, new CustomConverter());
return handlerAdapter;
}
}
Is there a way to do it using XML configuration file?