2017-10-13 65 views
2

我按照這個文檔this docsSpring集成SFTP的Java DSL:無法解析handleWithAdapter

方法,並添加行家depency:

<dependency> 
    <groupId>org.springframework.integration</groupId> 
    <artifactId>spring-integration-sftp</artifactId> 
    <version>5.0.0.M6</version> 
</dependency> 
<dependency> 
    <groupId>org.springframework.integration</groupId> 
    <artifactId>spring-integration-java-dsl</artifactId> 
    <version>1.2.3.RELEASE</version> 
</dependency> 

但它並不能解決這些方法: enter image description here

做我想念什麼?

回答

2

從Spring Integration 5.0開始,整個Java DSL項目被合併到核心項目中。所以,你不再需要額外的spring-integration-java-dsl依賴。更多內容與Spring Integration 5.0不兼容。

因爲所有名稱空間工廠都分佈在相應的模塊之間,所以沒有任何更多這樣的handleWithAdapter(),因爲沒有單一入口點。

所以,現在你必須這樣做:

.handle(Sftp.outboundGateway(...)) 

更多信息,請參見Migration Guide

也可以從版本blog post追溯到過去。