2017-03-30 24 views
0

我正在試驗Spring Boot和Camel。我有一個簡單的途徑:沒有找到與計劃組件的原因:ftp

@Component 
public class MyRoute extends RouteBuilder { 

    @Override 
    public void configure() throws Exception { 
     from("ftp://localhost/INBOUND?username=blah&password=foo") 
       .to("file:/tmp/test"); 
    } 
} 

我的POM文件有:

<dependency> 
    <groupId>org.apache.camel</groupId> 
    <artifactId>camel-spring-boot-starter</artifactId> 
    <version>2.18.3</version> 
</dependency> 
<dependency> 
    <groupId>org.apache.camel</groupId> 
    <artifactId>camel-ftp</artifactId> 
    <version>2.18.3</version> 
</dependency> 

在啓動時,我得到以下錯誤:

Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route2: Route(route2)[[From[ ftp://localhost/INBOUND?username=blah ... because of Failed to resolve endpoint: ftp://localhost/INBOUND?password=set42now&username=comcast due to: No component found with scheme: ftp

任何想法?

+0

嘗試'camel-ftp-starter'依賴項名稱。 – Strelok

+0

是的,你需要'camel-ftp-started'依賴。 – Khaled

+0

使用camel-ftp-starter確實有效,但我也不得不取消對camel-spring-boot-starter的依賴。我有一個新問題,但是當我做了更多的研究時,我會在另一篇文章中提到這個問題。如果有人想正式回答這個問題,我會接受答案並給他們信用。 – David

回答

1

您需要camel-ftp-starter依賴項而不是camel-ftp