抢先一步
VMware 提供培训和认证,以加速您的进步。
了解更多我很高兴代表 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
等。
我们期待您的反馈!