如需使用最新稳定版本,请使用 Spring Integration 7.0.4spring-doc.cadn.net.cn

5.1 与 5.2 之间的变更

包和类变更

Pausable 已从 o.s.i.endpoint 移至 o.s.i.corespring-doc.cadn.net.cn

行为变更

查看关于此版本行为更改的 迁移指南spring-doc.cadn.net.cn

新组件

RSocket 支持

The spring-integration-rsocket 模块现已可用,并提供用于 RSocket 协议支持的通道适配器实现。 有关更多信息,请参阅 RSocket 支持spring-doc.cadn.net.cn

速率限制建议支持

The RateLimiterRequestHandlerAdvice is now available for limiting requests rate on handlers. See Rate Limiter Advice for more information.spring-doc.cadn.net.cn

缓存建议支持

The CacheRequestHandlerAdvice now available for caching request results on handlers. See Caching Advice for more information.spring-doc.cadn.net.cn

Kotlin 脚本支持

JSR223 脚本模块现在支持 Kotlin 脚本。 有关更多信息,请参阅 脚本支持spring-doc.cadn.net.cn

Flux 聚合器支持

The FluxAggregatorMessageHandler now 可用于基于 Project Reactor Flux 操作符的分组和窗口化消息逻辑。 有关更多信息,请参阅 Flux Aggregatorspring-doc.cadn.net.cn

FTP/SFTP 事件发布者

FTP 和 SFTP 模块现在为某些 Apache Mina FTP/SFTP 服务器事件提供了事件监听器。 有关更多信息,请参阅 Apache Mina FTP 服务器事件Apache Mina SFTP 服务器事件spring-doc.cadn.net.cn

Avro 转换器

现在提供简单的 Apache Avro 转换器。 有关更多信息,请参阅 Avro 转换器spring-doc.cadn.net.cn

常规变更

The JsonToObjectTransformer now supports generics for the target object to deserialize into. See JSON Transformers for more information.spring-doc.cadn.net.cn

The splitter now supports a discardChannel configuration option. See Splitter for more information.spring-doc.cadn.net.cn

控制总线现在可以处理PausableLifecycle的扩展)操作。 有关更多信息,请参阅控制总线spring-doc.cadn.net.cn

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.spring-doc.cadn.net.cn

框架中抛出的所有MessageHandlingException异常,现在都包含一个 Bean 资源和来源,以便在无需涉及最终用户代码的情况下追踪配置部分。 有关更多信息,请参阅错误处理spring-doc.cadn.net.cn

为了更好的终端用户体验,Java DSL 现在提供了基于网关接口启动流程的配置器变体。 有关更多信息,请参阅 IntegrationFlows.from(Class<?> serviceInterface, Consumer<GatewayProxySpec> endpointConfigurer) JavaDocs。 此外,MethodArgsHolder 现在已成为 GatewayProxyFactoryBean 中所有表达式的评估上下文的根对象。 #args#method 评估上下文变量现已弃用。 有关更多信息,请参阅 消息网关spring-doc.cadn.net.cn

AMQP 变更

出站端点现在可以配置为:如果在超时时间内未收到发布者的确认,则合成"nack"。 有关更多信息,请参见 出站通道适配器spring-doc.cadn.net.cn

入站通道适配器现在可以接收以List<?>为有效负载的批量消息,而不是为每个批量片段接收离散消息。 有关更多信息,请参阅批量消息spring-doc.cadn.net.cn

出站通道适配器现在可以配置为阻塞调用线程,直到收到发布者的确认(acknowledgment)。 有关更多信息,请参见 出站通道适配器spring-doc.cadn.net.cn

文件更改

对远程文件过滤功能进行了一些改进。 有关更多信息,请参阅 远程持久化文件列表过滤器spring-doc.cadn.net.cn

TCP 变更

ByteArrayLengthHeaderSerializer使用的长度标头现在可以包含标头长度以及有效负载的长度。 有关更多信息,请参阅消息界定(序列化和反序列化)spring-doc.cadn.net.cn

当使用 TcpNioServerConnectionFactory 时,现在优先接受新连接而不是读取现有连接的连接,但这是可配置的。 有关更多信息,请参阅 关于非阻塞 I/O (NIO)spring-doc.cadn.net.cn

出站网关有一个新属性 closeStreamAfterSend;当与每个请求/回复的新连接一起使用时,它会向服务器发送 EOF(文件结束符),而不会关闭连接。 这对于使用 EOF 来指示消息结束而不是在数据中使用某些分隔符的服务器非常有用。 有关更多信息,请参阅 TCP 网关spring-doc.cadn.net.cn

客户端连接工厂现在支持connectTimeout,如果在此时间内未建立连接,则会抛出异常。 有关更多信息,请参阅TCP 连接工厂spring-doc.cadn.net.cn

SoftEndOfStreamException 现在是一个 RuntimeException,而不是扩展 IOExceptionspring-doc.cadn.net.cn

邮件变更

The AbstractMailReceiver 现在有一个 autoCloseFolder 选项(默认值为 true),用于在获取后禁用自动关闭文件夹,但改为填充 IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE 标头以进行下游交互。 有关更多信息,请参阅 邮件接收通道适配器spring-doc.cadn.net.cn

HTTP 变更

HTTP 入站端点现在支持请求负载验证。 有关更多信息,请参阅 HTTP 支持spring-doc.cadn.net.cn

WebFlux 变更

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.spring-doc.cadn.net.cn

MongoDB 变更

The MongoDbMessageStore can now be configured with custom converters. See MongoDB Support for more information.spring-doc.cadn.net.cn

路由变更

您现在可以禁用回退到使用通道键作为通道 bean 名称。 有关更多信息,请参阅 动态路由器spring-doc.cadn.net.cn

FTP/SFTP 变更

The RotatingServerAdvice is decoupled now from the RotationPolicy and its StandardRotationPolicy.spring-doc.cadn.net.cn

远程文件信息(包括主机/端口和目录)现在已包含在 AbstractInboundFileSynchronizingMessageSourceAbstractRemoteFileStreamingMessageSource 实现的消息头中。 此外,该信息也已包含在 AbstractRemoteFileOutboundGateway 实现的文件读取操作结果的头信息中。 FTP 出站端点现在支持使用 chmod 来更改上传文件的权限。 (SFTP 自 4.3 版本起已支持此功能)。 有关更多信息,请参阅 FTP(S) 支持SFTP 支持spring-doc.cadn.net.cn