SpringSource/spring-integration — pull request #659 by garyrussell (2012-10-30 21:07:34+00:00)
Title: INT-2791 Add JsonAwareInboundMessageConverter

The recent change to make the object-to-json-transformer
insert a content-type header 'application/json' broke the
common pattern

->object-to-json-transformer->amqp-out->amqp-in->json-to-object-transformer

because the amqp-in now creates a byte[] instead of a String. This is
because the default SimpleMessageConverter doesn't understand this
contentType.

Introduce a new attribute 'request-payload-type' on the amqp inbound
endpoints. When set, the endpoints now configure a JsonAwareInboundMessageConverter
that can delegate to either a JsonMessageConverter (with a custom class mapper)
or a SimpleMessageConverter.

This provides backward compatibility; users with the above pattern can
simply set 'request-payload-type' to 'java.lang.String' and everything will
work as before.

Or, set the 'request-payload-type' to the type in the json-to-object-transformer,
and eliminate that transformer.

**Add note to migration guide**