Spring Integration 5.3 Milestone 2 发布

发布 | Artem Bilan | 2020年2月12日 | ...

我很高兴地宣布 Spring Integration 团队推出了 Spring Integration 5.3第二个里程碑版本。

此版本包含多项错误修复、许多新功能和改进,并将很快被 Spring Boot 2.3 M2 采用。

可以从我们的 里程碑仓库 下载

compile "org.springframework.integration:spring-integration-core:5.3.0.M2"

最重要的主要新功能是

  • 通过 IntegrationFlowExtension 的实现,我们现在可以为 Spring Integration 编写自己的 Java DSL。它允许引入自定义或组合的 EIP 操作符。现有的 IntegrationComponentSpec 实现现在可以扩展以支持其他(缺失的?)选项。因此,现在可以在目标项目中实现任何自定义且可重用的 Java DSL 解决方案。

    public class CustomIntegrationFlowDefinition extends IntegrationFlowExtension {

    public CustomIntegrationFlowDefinition upperCaseAfterSplit() {
        return split()
                .transform("payload.toUpperCase()");
    }
    
    public CustomIntegrationFlowDefinition customAggregate(
                    Consumer<CustomAggregatorSpec> aggregator) {
        return register(new CustomAggregatorSpec(), aggregator);
    }
    

    }

    public class CustomAggregatorSpec extends AggregatorSpec {

    CustomAggregatorSpec() {
        outputProcessor(group ->
                group.getMessages()
                        .stream()
                        .map(Message::getPayload)
                        .map(String.class::cast)
                        .collect(Collectors.joining(", ")));
    }
    

    }

    @Bean public IntegrationFlow customFlowDefinition() { return new CustomIntegrationFlowDefinition() .log() .upperCaseAfterSplit() .channel("innerChannel") .customAggregate(customAggregatorSpec -> customAggregatorSpec.expireGroupsUponCompletion(true)) .logAndReply(); }

  • HTTP 和 WebFlux 出站通道适配器现在支持 UriBuilderFactory.EncodingMode 选项,而不是之前的 `encodeUri` 布尔标志。

  • AMQP 出站通道适配器有一个新的属性 multiSend,允许在单个 RabbitTemplate 调用范围内发送多个消息。

  • AMQP 入站通道适配器现在支持一个属性 consumerBatchEnabled 设置为 true 的侦听器容器。

有关更多信息,请参阅参考手册中的新功能

下一个也是最后一个 M3 里程碑计划在三月份发布,随后在四月份进入 RC 阶段。请期待升级到最新的里程碑版本:Spring Data Neumann,Spring Security 5.3 等。

我们期待您的反馈!

项目主页 | GitHub Issues | 贡献指南 | 帮助 | 聊天

获取 Spring 新闻通讯

通过 Spring 新闻通讯保持联系

订阅

领先一步

VMware 提供培训和认证,助您加速进步。

了解更多

获得支持

Tanzu Spring 提供 OpenJDK™、Spring 和 Apache Tomcat® 的支持和二进制文件,只需一份简单的订阅。

了解更多

即将举行的活动

查看 Spring 社区所有即将举行的活动。

查看所有