Spring Integration 5.1 to 5.2 Migration Guide
Table of Contents
- Deprecated ChannelInterceptorAware
- JDBC Outbound Gateway maxRows
- GatewayMethodMetadata payloadExpression
- Jackson 2.10
ChannelInterceptorAware has been deprecated in favor of
org.springframework.messaging.support.InterceptableChannel with exact functionality.
protected AbstractMessageChannel.getInterceptors() method to obtain an internal
AbstractMessageChannel.ChannelInterceptorList has been renamed to the
getIChannelInterceptorList() since it clashes with the
InterceptableChannel.getInterceptors() and they have a different return types.
VetoCapableInterceptor.shouldIntercept() signature has been changed to accept an
JDBC Outbound Gateway maxRows
maxRows for the
> 1, the query result is returned as a
List even if it contains only one item.
Previously when only one item was retrieved the payload was the item itself, independent of the
Always returning a list makes user code simpler, but this change may break some existing applications.
Most likely, however, it won't because, presumably, such apps would always check for both an object or a list of objects; this is no longer necessary since it will always be a list.
publishSubscribeChannel Behavior Change
Given the following
return f -> f .publishSubscribeChannel(c -> c .subscribe(sf -> sf.handle(...) .subscribe(sf -> sf.handle(...) .subscribe(sf -> sf.handle(...)) ...
If this flow is defined in a static
@Bean definition, the subscribers are invoked in the natural (first to last) order.
However, with previous releases, if the flow is registered dynamically with the
IntegrationFlowContext, the subscribers were invoked last to first.
Starting with the 5.2 release, the subscribers are invoked in the natural (first to last) order, regardless of static Vs. dynamic registration.
(S)FTP Session getHostPort() contract
org.springframework.integration.file.remote.session.Session provides a
getHostPort() contract to be implemented as a remote host and port pair (e.g.
localhost:22 for local FTP server).
FtpSession provides an implementation as a result of
this.client.getRemoteAddress().getHostName() + ':' + this.client.getRemotePort() expression.
this.jschSession.getHost() + ':' + this.jschSession.getPort().
This contract must not return
GatewayMethodMetadata.setPayloadExpression() now requires an
Expression instead of plain
As well as
getPayloadExpression() returns now an
Expression instead of
We can't keep a
String-based setter/getter because XML parser relies on the Java Beans introspector to populate properties.
The minimum requirements for Jackson JSON process is now version
2.10 because of some breaking changes in its API.