Skip to content

Conversation

artembilan
Copy link
Member

Fixes #3052

Starting with version 5.1, a LambdaMessageProcessor is based on the
MessageConverter instead of plain ConversionService.
(A ConfigurableCompositeMessageConverter is used from the application
context.)
However a type conversion based on the @IntegrationConverter is lost
in the GenericMessageConverter because it doesn't use an
integrationConversionService from the application context

  • Change ConfigurableCompositeMessageConverter to configure a
    GenericMessageConverter with an integrationConversionService
    if any
  • Fix MessagingMethodInvokerHelper to populate a BeanFactory into
    its internal ConfigurableCompositeMessageConverter
  • Ensure in the LambdaMessageProcessorTests that
    @IntegrationConverter is applied for ``LambdaMessageProcessor` as well

Cherry-pick to 5.1.x

Fixes spring-projects#3052

Starting with version `5.1`, a `LambdaMessageProcessor` is based on the
`MessageConverter` instead of plain `ConversionService`.
(A `ConfigurableCompositeMessageConverter` is used from the application
context.)
However a type conversion based on the `@IntegrationConverter` is lost
in the `GenericMessageConverter`  because it doesn't use an
`integrationConversionService` from the application context

* Change `ConfigurableCompositeMessageConverter` to configure a
 `GenericMessageConverter`  with an  `integrationConversionService`
 if any
* Fix `MessagingMethodInvokerHelper` to populate a `BeanFactory` into
its internal `ConfigurableCompositeMessageConverter`
* Ensure in the `LambdaMessageProcessorTests` that
`@IntegrationConverter` is applied for ``LambdaMessageProcessor` as well

**Cherry-pick to 5.1.x**
@garyrussell garyrussell merged commit 9272782 into spring-projects:master Sep 13, 2019
@garyrussell
Copy link
Contributor

Cherry-pick is not clean - please backport.

@artembilan
Copy link
Member Author

Back-ported to 5.1.x as addf2db after fixing conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spring Integration 5.1 - integration flow convertion with @IntegrationConverter doesn't work

2 participants