public class ApplicationContext {
@Bean MessageConverter jsonConverter() {
SimpleMessageConverter converter = new SimpleMessageConverter();
JsonInboundMessageMapper inbound = new JsonInboundMessageMapper(HashMap.class);
JsonOutboundMessageMapper outbound = new JsonOutboundMessageMapper();
converter.setInboundMessageMapper(inbound);
converter.setOutboundMessageMapper(outbound);
return converter;
}