You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is `json`-aware `contentType` header in the message to process
and payload type is `String` or `byte[]` and it isn't equal to the
expected exclusive method argument type (even generic from the `Message<>`),
the conversion should happen only if SpelInvoker is no method.
The regular `InvocableHandlerMethod` takes care about payload conversion
via configured `MessageConverter` in the `PayloadArgumentResolver`
* Fix `MessagingMethodInvokerHelper` to call JSON conversion only when
`this.handlerMethod.spelOnly`
NOTE: We can't do generics conversion right now because it is going
to be a breaking change around
`org.springframework.integration.support.json.JsonObjectMapper` property
in the `MessagingMethodInvokerHelper`.
We can do that only in `5.1` and rely there only on the functionality
from the Jackson Object mapper
* Convert from JSON only in the `invokeExpression()`
* Optimize message recreation only if target param type is `Message`.
Otherwise override just `payload` property of the `ParametersWrapper`
Copy file name to clipboardExpand all lines: spring-integration-core/src/main/java/org/springframework/integration/util/MessagingMethodInvokerHelper.java
+57-42Lines changed: 57 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -308,46 +308,10 @@ public void setConversionService(ConversionService conversionService) {
Copy file name to clipboardExpand all lines: spring-integration-core/src/test/java/org/springframework/integration/handler/MethodInvokingMessageProcessorTests.java
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1017,7 +1017,12 @@ public String myMethod(List<Employee<Person>> msg) {
1017
1017
ObjectMapperobjectMapper = newObjectMapper();
1018
1018
byte[] value = objectMapper.writeValueAsBytes(testData);
0 commit comments