SpringSource/spring-integration — pull request #662 by garyrussell (2012-10-31 19:25:40+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 invoke the superclass (SimpleMessageConverter) methods.

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**

INT-2797: polishing (artembilan)

Replaces PR #659 which was from the wrong branch.