导入pom文件
<!-- FTP的支持 -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
<version>${camel.version}</version>
</dependency>
从服务器A将文件传输到服务器B
<!-- camel配置 -->
<camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring">
<propertyPlaceholder id="camelProperties" location="classpath:camel.properties" />
<route id="jettyRoute">
<from uri="sftp://192.168.80.12:22/ftp1?username=user&password=pwd&disconnect=true&recursive=true&streamDownload=true"/>
<to uri="sftp://192.168.80.13:22/ftp2?username=user&password=pwd&disconnect=true"/>
</route>
</camelContext>