4
我有以下結構。彈簧集成聚合器無法正常工作。
<int:publish-subscribe-channel id="updateProjectRequest" />
<int:channel id="aggregate-project"/>
<int:service-activator input-channel="updateProjectRequest" output-channel="aggregate-project" ref="updateProjectResponseHandler" method="createFolder"/>
<int:service-activator input-channel="updateProjectRequest" output-channel="aggregate-project" ref="updateProjectResponseHandler" method="createRepo"/>
<int:aggregator input-channel="aggregate-project" ref="projectAggregator">
以下是我的Aggregator類。
@Component("projectAggregator")
public class ProjectAggregator {
@Aggregator
public boolean aggregatingMethod(List<Map<String, List<Project>>> items) {
//////// CODE //////
}
@ReleaseStrategy
public boolean releaseChecker(List<Message<?>> messages) {
//////CODE/////
}
@CorrelationStrategy
public Map<String, List<Project>> correlateBy(Map<String, List<Project>> item) {
return item;
}
問題是如果我打印@ReleaseStrategy方法的消息長度它始終保持1.據我所知,這應該增加。你能幫我找出上面提到的代碼有什麼問題嗎?