Apache Camel - How to set a private key in a dinamic sftp endpoint
问题 Using Java DSL, I have a route in which I poll a file in an SFTP server using the file name set in the message headers from("direct:download") .pollEnrich() .simple("sftp://my.host:22/folder/?username=foo&fileName=${header.CamelFileName}") .to("file://state/downloaded"); The sftp endpoint needs to have set a private key. Usually something like this suffices: endpoint("sftp://my.host:22/folder/?username=foo&fileName=my_file_explicitly_written_here", SftpEndpoint.class).getConfiguration()