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 里程碑计划于 3 月发布,然后在 4 月进入 RC 阶段。 预计将升级到最新的里程碑版本:Spring Data Neumann, Spring Security 5.3 等。

我们期待您的反馈!

项目页面 | GitHub 问题 | 贡献 | 帮助 | 聊天

获取 Spring 新闻通讯

与 Spring 新闻通讯保持联系

订阅

抢先一步

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

了解更多

获得支持

Tanzu Spring 在一个简单的订阅中提供对 OpenJDK™、Spring 和 Apache Tomcat® 的支持和二进制文件。

了解更多

即将举行的活动

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

查看全部