-
Notifications
You must be signed in to change notification settings - Fork 1.1k
DefaultSftpSessionFactory file resolving inconsistency #3211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There is an API like this:
So, we indeed can have that Feel free to contribute the fix, @andybaer ! Thanks for pointing this out! |
@andybaer , Since you have not answered yet, but we are going to release tomorrow, I take an issue and will provide a Pull Request shortly. |
Fixes spring-projects#3211 * Add `DefaultSftpSessionFactory.setKnownHosts(Resource)` to allow to configure externally any resource for file with known_hosts content * Deprecate an existing method in favor of new one * The new method makes it aligned with the `setPrivateKey(Resource)` * Fix tests do not use a deprecated method any more **Cherry-pick to 5.2.x**
* GH-3211: Add DefSftpSF.setKnownHosts(Resource) Fixes #3211 * Add `DefaultSftpSessionFactory.setKnownHosts(Resource)` to allow to configure externally any resource for file with known_hosts content * Deprecate an existing method in favor of new one * The new method makes it aligned with the `setPrivateKey(Resource)` * Fix tests do not use a deprecated method any more **Cherry-pick to 5.2.x** * * Rename to `setKnownHostsResource()` to avoid XML parser confusion * Change `sftp.adoc` to reflect a new property
Sorry for the late answer. I tried to get the build working behind the corporate proxy but failed to do so. Thank you very much |
Using Spring Boot 2.2.4 with Spring Integration SFTP 5.2.3
org.springframework.integration.sftp.session.DefaultSftpSessionFactory
Actual Behavior:
Property
privateKey
expects the prefixfile:
since it is resolved by Spring.Property
knownHosts
does not work withfile:
prefix since it is passed directly to JCraft.Expected Behavior:
Both properties
privateKey
andknownHosts
work withfile:
prefix.The text was updated successfully, but these errors were encountered: