Spring Integration 5.3 里程碑版本 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 社群中所有即將到來的活動。

檢視所有