Changes between 5.1 and 5.2
Package and Class Changes
Pausable
已从 o.s.i.endpoint
移至 o.s.i.core
。
Pausable
has been moved from o.s.i.endpoint
to o.s.i.core
.
Behavior Changes
有关此版本中的行为更改,请参见 Migration Guide。
See the Migration Guide about behavior changes in this version.
New Components
RSocket Support
spring-integration-rsocket
模块现在提供 RSocket 协议支持的通道适配器实现。有关详细信息,请参阅 RSocket Support。
The spring-integration-rsocket
module is now available with channel adapter implementations for RSocket protocol support.
See RSocket Support for more information.
Rate Limit Advice Support
现已推出 RateLimiterRequestHandlerAdvice
,用于限制对处理程序的请求速率。有关更多信息,请参见 Rate Limiter Advice。
The RateLimiterRequestHandlerAdvice
is now available for limiting requests rate on handlers.
See Rate Limiter Advice for more information.
Caching Advice Support
现已推出 CacheRequestHandlerAdvice
,用于缓存对处理程序的请求结果。有关更多信息,请参见 Caching Advice。
The CacheRequestHandlerAdvice
is now available for caching request results on handlers.
See Caching Advice for more information.
Kotlin Scripts Support
JSR223 脚本模块现在包含对 Kotlin 脚本的支持。有关详细信息,请参见 Scripting Support。
The JSR223 scripting module now includes a support for Kotlin scripts. See Scripting Support for more information.
Flux Aggregator Support
现已推出 FluxAggregatorMessageHandler
,用于根据 Project Reactor Flux
运算符对消息进行分组和窗口化。有关更多信息,请参见 Flux Aggregator。
The FluxAggregatorMessageHandler
is now available for grouping and windowing messages logic based on the Project Reactor Flux
operators.
See Flux Aggregator for more information.
FTP/SFTP Event Publisher
FTP 和 SFTP 模块现在提供针对特定 Apache Mina FTP/SFTP 服务端事件的事件监听器。请参见 Apache Mina FTP Server Events 和 Apache Mina SFTP Server Events 以了解更多信息。
The FTP and SFTP modules now provide an event listener for certain Apache Mina FTP/SFTP server events. See Apache Mina FTP Server Events and Apache Mina SFTP Server Events for more information.
Avro Transformers
现已提供简单的 Apache Avro 转换器。有关更多信息,请参见 Avro Transformers。
Simple Apache Avro transformers are now provided. See Avro Transformers for more information.
General Changes
现已为 JsonToObjectTransformer
支持将目标对象反序列化成泛型。有关更多信息,请参见 JSON Transformers。
The JsonToObjectTransformer
now supports generics for the target object to deserialize into.
See JSON Transformers for more information.
splitter
现在支持 discardChannel
配置选项。请参见 Splitter 以了解更多信息。
The splitter
now supports a discardChannel
configuration option.
See Splitter for more information.
Control Bus 现可处理 Pausable
操作( Lifecycle
的扩展)。有关更多信息,请参见 Control Bus。
The Control Bus can now handle Pausable
(extension of Lifecycle
) operations.
See Control Bus for more information.
已经为聚合器组件引入 Function<MessageGroup, Map<String, Object>>
策略,以合并和计算输出消息的标头。有关更多信息,请参见 Aggregator Programming Model。
The Function<MessageGroup, Map<String, Object>>
strategy has been introduced for the aggregator component to merge and compute headers for output messages.
See Aggregator Programming Model for more information.
框架中抛出的所有 MessageHandlingException
,现在都包含一个 bean 资源和源,用于在没有涉及最终用户代码的情况下回溯配置部分。有关更多信息,请参见 Error Handling。
All the MessageHandlingException
s thrown in the framework, includes now a bean resource and source for back tracking a configuration part in case no end-user code involved.
See Error Handling for more information.
为了改善最终用户体验,Java DSL 现在提供了一个配置器变体以通过网关接口启动流。请参见 IntegrationFlows.from(Class<?> serviceInterface, Consumer<GatewayProxySpec> endpointConfigurer)`JavaDocs 以了解更多信息。此外,`MethodArgsHolder
现在是 GatewayProxyFactoryBean
中所有表达式的评估上下文的根对象。#args
和 #method
评估上下文变量现在已弃用。请参见 Messaging Gateways 以了解更多信息。
For better end-user experience, Java DSL now provides a configurer variant for starting flow with a gateway interface.
See IntegrationFlows.from(Class<?> serviceInterface, Consumer<GatewayProxySpec> endpointConfigurer)
JavaDocs for more information.
Also a MethodArgsHolder
is now a root object for evaluation context for all the expressions in the GatewayProxyFactoryBean
.
The #args
and #method
evaluation context variables are now deprecated.
See Messaging Gateways for more information.
AMQP Changes
出站端点现在可以配置为在超时未收到发布者确认的情况下合成“nack”。有关详细信息,请参见 Outbound Channel Adapter。
The outbound endpoints can now be configured to synthesize a "nack" if no publisher confirm is received within a timeout. See Outbound Channel Adapter for more information.
入站通道适配器现在可以接收批处理消息,作为 List<?>
有效负载,而不是为每个批处理片段接收离散消息。有关详细信息,请参见 Batched Messages。
The inbound channel adapter can now receive batched messages as a List<?>
payload instead of receiving a discrete message for each batch fragment.
See Batched Messages for more information.
出站通道适配器现在可以配置为阻塞调用线程,直到收到发布者确认(应答)。请参见 Outbound Channel Adapter 以了解更多信息。
The outbound channel adapter can now be configured to block the calling thread until a publisher confirm (acknowledgment) is received. See Outbound Channel Adapter for more information.
File Changes
已经进行了一些改进以筛选远程文件。请参见 Remote Persistent File List Filters 以了解更多信息。
Some improvements to filtering remote files have been made. See Remote Persistent File List Filters for more information.
TCP Changes
ByteArrayLengthHeaderSerializer
中使用的长度头现在除了有效负载可以包含头信息长度。有关详细信息,请参见 Message Demarcation (Serializers and Deserializers)。
The length header used by the ByteArrayLengthHeaderSerializer
can now include the length of the header in addition to the payload.
See Message Demarcation (Serializers and Deserializers) for more information.
当使用 TcpNioServerConnectionFactory
时,现在优先接受新连接而不是从现有连接读取,但这是可配置的。请参见 About Non-blocking I/O (NIO) 以了解更多信息。
When using a TcpNioServerConnectionFactory
, priority is now given to accepting new connections over reading from existing connections, but it is configurable.
See About Non-blocking I/O (NIO) for more information.
出站网关有一个新属性 closeStreamAfterSend
;当每个请求/回复使用新连接时,它会向服务器发出 EOF 信号,但不会关闭连接。这对使用 EOF 来发送消息结束信号而不是数据中某个定界符的服务器来说很有用。请参见 TCP Gateways 以了解更多信息。
The outbound gateway has a new property closeStreamAfterSend
; when used with a new connection for each request/reply it signals EOF to the server, without closing the connection.
This is useful for servers that use the EOF to signal end of message instead of some delimiter in the data.
See TCP Gateways for more information.
客户端连接工厂现在支持 connectTimeout
,它会在连接未在指定时间内建立时引发异常。有关详细信息,请参见 TCP Connection Factories。
The client connection factories now support connectTimeout
which causes an exception to be thrown if the connection is not established in that time.
See TCP Connection Factories for more information.
SoftEndOfStreamException
现在是 RuntimeException
,而不是扩展 IOException
。
SoftEndOfStreamException
is now a RuntimeException
instead of extending IOException
.
Mail Changes
AbstractMailReceiver
现在有一个 autoCloseFolder
选项(默认为 true
),用于在获取之后禁用自动关闭文件夹,而是填充 IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE
标头以供下游交互。有关详细信息,请参见 Mail-receiving Channel Adapter。
The AbstractMailReceiver
has now an autoCloseFolder
option (true
by default), to disable an automatic folder close after a fetch, but populate IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE
header instead for downstream interaction.
See Mail-receiving Channel Adapter for more information.
HTTP Changes
HTTP 入站端点现在支持请求有效负载验证。请参见 HTTP Support 以了解更多信息。
The HTTP inbound endpoint now support a request payload validation. See HTTP Support for more information.
WebFlux Changes
WebFluxRequestExecutingMessageHandler
现在支持 Publisher
、Resource
和 MultiValueMap
作为请求消息 payload
。WebFluxInboundEndpoint
现在支持请求有效负载验证。请参见 WebFlux Support 以了解更多信息。
The WebFluxRequestExecutingMessageHandler
now supports a Publisher
, Resource
and MultiValueMap
as a request message payload
.
The WebFluxInboundEndpoint
now supports a request payload validation.
See WebFlux Support for more information.
MongoDb Changes
MongoDbMessageStore
现在可以用自定义转换器进行配置。请参见 MongoDB Support 以了解更多信息。
The MongoDbMessageStore
can now be configured with custom converters.
See MongoDB Support for more information.
Router Changes
您现在可以禁用回退到频道密钥的情况,使其作为频道 bean 名称。有关详细信息,请参见 Dynamic Routers。
You can now disable falling back to the channel key as the channel bean name. See Dynamic Routers for more information.
FTP/SFTP Changes
RotatingServerAdvice
现已与 RotationPolicy
及其 StandardRotationPolicy
分离。
The RotatingServerAdvice
is decoupled now from the RotationPolicy
and its StandardRotationPolicy
.
现在,远程文件信息,包括主机/端口和目录,包含在 AbstractInboundFileSynchronizingMessageSource
和 AbstractRemoteFileStreamingMessageSource
实现中的消息头中。此信息也包含在 AbstractRemoteFileOutboundGateway
实现的读取操作结果的头中。FTP 出站端点现在支持 chmod
以更改已上传文件的权限。(SFTP 自 4.3 版起已支持它)。有关详细信息,请参见 FTP(S) Support 和 SFTP Support。
The remote file information, including host/port and directory are included now into message headers in the AbstractInboundFileSynchronizingMessageSource
and AbstractRemoteFileStreamingMessageSource
implementations.
Also this information is included into headers in the read operations results of the AbstractRemoteFileOutboundGateway
implementations.
The FTP outbound endpoints now support chmod
to change permissions on the uploaded file.
(SFTP already supported it since version 4.3).
See FTP(S) Support and SFTP Support for more information.