我最近转向了 Spring boot,并开始将所有 XML 转换为 Java 配置。 @Aggregate 注释没有 expireGroupUponCompletion 和 persistenceStore 作为输入。我们还有其他方法可以指定这些东西吗?
最佳答案
Is there any other way we can specify these things?
使用Spring Integration Java DSL :
.aggregate(a -> a.expireGroupsUponCompletion(true)
.sendPartialResultOnExpiry(true)
.messageStore(messageStore(), null)
第二个 null
参数意味着我们对某些端点
自定义不感兴趣,只依赖于默认状态。我们保留该语法以避免 Lambda 参数的显式类型:
.aggregate((AggregatorSpec a) -> a.expireGroupsUponCompletion(true)
.sendPartialResultOnExpiry(true)
.messageStore(messageStore())
关于Spring Aggregator Annotation没有expireGroupUponCompletion和persistenceStore作为输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25887503/