在Apache Camel Spring DSL中使用ZipSplitter

hve*_*iga 3 java zip spring apache-camel

我想知道如何在Spring DSL中使用camel-zipfile中的ZipSplitter.我一直在尝试基于这篇文章的不同方法使用Apache Camel UnZippedMessageProcessor解压缩文件,但我无法弄清楚如何在Spring中做.另外,我还没有找到任何关于此的例子.

我有这样的事情:

<bean id="zipSplitter" class="org.apache.camel.dataformat.zipfile.ZipSplitter" />

...

<split streaming="true" parallelProcessing="true">
    <?????>
    <convertBodyTo type="java.lang.String" />
    <to uri="file:foo" />
</split>
Run Code Online (Sandbox Code Playgroud)

谢谢您的帮助!

Wil*_*ang 5

您可以使用像这样保存表达式的引用

<bean id="zipSplitter" class="org.apache.camel.dataformat.zipfile.ZipSplitter" />

...

<split streaming="true" parallelProcessing="true">
    <ref>zipSplitter</ref> 
    <convertBodyTo type="java.lang.String" />
    <to uri="file:foo" />
</split>
Run Code Online (Sandbox Code Playgroud)