2017-07-14 50 views
0

我正在使用一個簡單的駱駝春天項目,它具有從一個位置複製到另一個位置的文件路徑。但是當我部署捆綁包,甚至捆綁包處於活動狀態時,不知道爲什麼路由沒有啓動。以下是我已經開始的依賴包。從Karaf 4.1.1開始,但在ServiceMix中運行的路線

28 │ Active │ 80 │ 4.1.1   │ Apache Karaf :: OSGi Services :: Event 
53 │ Active │ 80 │ 2.19.1   │ camel-commands-core 
54 │ Active │ 50 │ 2.19.1   │ camel-core 
55 │ Active │ 80 │ 2.19.1   │ camel-karaf-commands 
59 │ Active │ 50 │ 2.19.1   │ camel-spring 
68 │ Active │ 80 │ 1.0.0.SNAPSHOT │ A Camel Spring Route 

但是,當我用同樣的駱駝春路捆綁在Apache的服務組合安裝,我看到在我的路線開始,做工精細的路由列表。我是否需要啓動其他任何捆綁包才能開始工作。

請按照鏈接查看捆綁包。 Link to Download Bundle

下面是簡單的項目 enter image description here

下面從服務組合,其運作細節的圖像。

[email protected]>list | grep Active 
43 | Active | 50 | 2.16.5        | camel-core 
47 | Active | 50 | 2.16.5        | camel-spring 
49 | Active | 80 | 2.16.5        | camel-karaf-commands 
224 | Active | 80 | 1.0.0.SNAPSHOT      | A Camel Spring Route 

在此先感謝。

回答

3

您需要在Karaf 4.1.1中安裝camel-spring-dm功能,例如feature:install camel-spring-dm。另外介意spring-dm已被棄用/死亡,因此不建議使用它。如果您想在Karaf/ServiceMix中使用Camel進行XML路由,請改用OSGi Blueprint。

+0

看起來2.19.1中不存在camel-spring-dm支持。我確實使用過藍圖,它在karaf 4.1.1中運行良好。但是,我如何使用Spring @Components與Blueprint xml來引用spring beans? 。提前致謝。 –

+1

你不能在Blueprint中使用Spring'@ Component',它不是Spring。 –

0

卡拉夫4.1.1默認情況下,彈簧dm不存在。您需要先做

feature:repo-add spring-legacy 4.1.1 
+0

謝謝基督徒。使用中遇到問題。我正在轉向Apache服務組合,這已經得到了對dm的支持。 –

+2

不要投入太多時間來獲取spring-dm的工作。這是一個長期以來的死亡項目。像克勞斯一樣,建議最好轉向藍圖。 –