0
我想監視一個zip文件的目錄,然後使用Camel和Spring DSL單獨處理zip文件中的文件。是否有如下可能?如何使用Spring DSL處理與駱駝的zip文件?
<camel:route>
<camel:from uri="file:/src/Path/"/>
<camel:split streaming="true">
<zipSplit/>
<camel:to uri="bean:fileProcessor?method=processStream"/>
</camel:split>
</camel:route>
好了,所以我發現,包含一個文件中的zip文件下面的作品,但問題是如何能包含多個文件壓縮文件進行處理?
<bean id="zipFileDataFormat" class="org.apache.camel.dataformat.zipfile.ZipFileDataFormat"/>
<camel:camelContext>
<camel:contextScan/>
<camel:route>
<camel:from uri="file:///C:/testSrc/?delay=6000&noop=true&idempotent=false"/>
<camel:unmarshal ref="zipFileDataFormat"/>
<camel:to uri="file:///C:/testDst"/>
</camel:route>
</camel:camelContext>
請注意,該文件沒有被髮送到一個bean進行處理,只是解壓縮到另一個目錄。
只是問,你發佈的路線是否有效,或者你是在描述你的期望/要求? – Sikorski
也許可以參考這個.. http://stackoverflow.com/questions/17839379/unzip-a-file-using-apache-camel-unzippedmessageprocessor? – Sikorski
它是更多的要求,它是仿照另一條路線,目前正在爲我工作 –