我使用 Camel DSL 路由定义:
@Component
public class UploadRoutesDefinition extends RouteBuilder {
...
@Override
public void configure() throws Exception {
```
from(String.format("sftp://%s@%s:%d/%s?password=%s&delete=true&readLock=changed&delay=%s"
...
当我将文件放入 sftp 文件夹时,我看到以下日志:
20/03/2018 14:02:4420.03.18 14:02:44.193 [Camel (My_Service) thread #3 - seda://parsed_csv] INFO o.a.c.c.file.remote.SftpOperations - Known host file not configured, using user known host file: /home/gradle/.ssh/known_hosts
20/03/2018 14:02:4420.03.18 14:02:44.300 [Camel (MIS_UploadService) thread #3 - seda://parsed_csv] WARN o.a.c.c.file.remote.SftpOperations - JSCH -> Permanently added 'sftp' (RSA) to the list of known hosts.
20/03/2018 14:02:4420.03.18 14:02:44.300 [Camel (MIS_UploadService) thread #3 - seda://parsed_csv] WARN o.a.c.c.file.remote.SftpOperations - Server asks for confirmation (yes|no): /home/gradle/.ssh/known_hosts does not exist.
20/03/2018 14:02:44Are you sure you want to create it?. Camel will answer no.
```
我想禁用主机验证。
看起来添加&useUserKnownHostsFile=false
到路径可以解决我的错误。但是我有很多路由定义,我不喜欢给每个 URL 添加这个后缀。我可以全局禁用此验证吗?