2015-05-19 17 views
1

我使用一個文件組件作爲Apache Camel:Linux環境下的文件組件;輪詢失敗

file:\\orderLocations 

閱讀的郵件。 在UNIX/Linux環境中部署我的Camel路由應用程序。 在部署中,每個投票給這個消息

Cannot poll as directory does not exists or its not a directory: /orderLocations 

雖然我看到名爲

\orderLocations 

創建一個文件夾。但是,它不會從那裏輪詢消息。

請指導使用文件組件在UNIX/Linux環境

+4

在端點中使用unix斜槓。並且介意如果您需要從根目錄輪詢,然後使用單個斜線,例如'file:/ orderLocations'。並確保用戶有權從該目錄中讀取。 –

+0

謝謝@ClausIbsen。我也能夠使用file:orderLocations。它創建了一個名爲orderLocations的文件夾,並從那裏輪詢消息。也會嘗試unix斜槓/ – DolphinJava

回答

1

你可以使用Spring DSL駱駝按照下面相應的OS

對Linux/Unix

<from uri="file:/user/tempdir?delete=true"/> 
正道

對於Windows

<from uri="file://user/tempdir?delete=true"/> 
+0

這是真的嗎?它在Windows中默認爲C:/?它似乎不是。 – djb