Apache camel 使用camel的sftp
我正在尝试使用camel使用sftp,并获得jsch-esception。 我为SFTP创建的路线-Apache camel 使用camel的sftp,apache-camel,Apache Camel,我正在尝试使用camel使用sftp,并获得jsch-esception。 我为SFTP创建的路线- <camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <package>myGroupId</package> <route> <from uri="file:src/srcData?noop=true"/> &
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<package>myGroupId</package>
<route>
<from uri="file:src/srcData?noop=true"/>
<choice>
<when>
<xpath>/person/city = 'London'</xpath>
<to uri="file:src/targetData/UK"/>
</when>
<when>
<xpath>/person/city = 'Chicago'</xpath>
<to uri="file:src/targetData/US"/>
</when>
<when>
<xpath>/person/city = 'Tokyo'</xpath>
<to uri="sftp://XXXserverXXX:22/dir1/subdir?username=testUser?password=testPwd&binary=true"/>
</when>
<otherwise>
<to uri="file:src/targetData/OT"/>
</otherwise>
</choice>
</route>
</camelContext>
myGroupId
/个人/城市=‘伦敦’
/个人/城市=‘芝加哥’
/个人/城市=‘东京’
但在这种配置下,我面临以下例外情况-
com.jcraft.jsch.JSchException:拒绝主机密钥:您可能应该定义一个主机文件: “knownHostsFile”选项应该指向一个ssh known hosts文件,其中包含您要连接的主机的公钥
这里有文档记录:您可能应该定义一个主机文件: “knownHostsFile”选项应该指向一个ssh known hosts文件,其中包含您要连接的主机的公钥 事实上,这里有记录: