5

我无法拆分列表中的 Java 对象。如何将 Body 标记/转换为单个 java 对象?

    <route id="cleanupMigratedFiles" autoStartup="true">

        <from uri="timer://kickoff?period=5s" />
        <bean ref="migrationProcessor" method="getCacheDeleteObjects" /> <!--  this gives me a List-of-CacheMigr -->
        <log message="\n\t########\n\tCleanupMigrated file: ${body}" />
        <pipeline>
            <split>
                <tokenize /> <!-- How to tokenize a List-of-CacheMigr  -->
                <convertBodyTo type="era.oddw.entity.CacheMigr" /> <!-- Do I need this? -->
                <log message="\n\t########\n\tCleanupMigrated file: ${body}" />
            </split>
        </pipeline>
    </route>
4

1 回答 1

10

经过更多阅读后找到了答案..以下标记正确标记了列表:${body}

感谢骆驼的家伙。

        <split streaming="true">
            <simple>${body}</simple>
            <convertBodyTo type="era.oddw.entity.CacheMigr" /> 
            <log message="\n\t########\n\tCleanupMigrated file each: ${body}" />
        </split>
于 2013-08-21T19:15:44.173 回答