- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.1k
Spring Integration 4.1 to 4.2 Migration Guide
##Class Package Change
- The ScatterGatherHandlerclass has been moved fromorg.springframework.integration.handlertoorg.springframework.integration.scattergather.
##TCP Serializers
The TCP Serializers no longer flush() the OutputStream; this is now done by the TcpNxxConnection classes. If you are using the serializers directly within user code, you may have to flush() the OutputStream after serialization.
##Reactor dependency changes
The Project Reactor has been upgraded to version 2.0 and its dependency has been marked as optional, to avoid extra transitive dependencies for those applications, which aren't interested in the Reactive Streams features, like Promise Gateway.
Those application which already uses Reactor with Spring Integration since version 4.1 must include its dependency explicitly now:
compile "io.projectreactor:reactor-core:2.0.0.RELEASE"
In addition the FunctionIterator has been changed to use org.springframework.integration.util.Function instead of similar class from the Reactor before.
Important. Since version 2.0 the Reactor is based on the Reactive Streams and there were done a lot of great changes, including package location. So, be sure that you have updated your code which is based on the previous Reactor version.
##HTTP
Before Spring Integration 4.0 the MessageHeaders.CONTENT_TYPE constant had had a value content-type. It was appropriate header name to be mapped to the HTTP header Content-Type. But since migration to Spring Messaging MessageHeaders.CONTENT_TYPE constant has a value contentType. It prevented to map Message header to the HTTP request properly. Now DefaultHttpHeaderMapper has been changed to map MessageHeaders.CONTENT_TYPE to HTTP response Content-Type header, if the default configuration is used. It allows to propagate Message state to the HTTP response automatically:
<int-http:inbound-gateway path="/foo" request-channel="httpRequest"/>
<int:object-to-json-transformer input-channel="httpRequest"/>##SFTP
The DefaultSftpSessionFactory no longer allows unknown host keys by default, to enhance security.
You can provide a pre-populated known_hosts file via the knownHosts property or, to revert to the previous behavior, set the allowUnknownKeys property to false.