0
我正在嘗試查找允許spring-integration-aws在本地創建遠程文件夾結構以便能夠同步的配置。春季集成Aws:本地創建遠程文件夾
例: 給定一個很長的S3存儲地址:
test.s3.bucket/folder1/floder2/folder3/etc/etc/etc/etc
目前得到的錯誤信息:
Caused by: java.io.FileNotFoundException: test.s3.bucket/folder1/floder2/folder3/etc/etc/etc/etc/DD2419D7-104E-46FC-A513-9E587E58A949.ZIP.a.writing (No such file or directory)
它看起來就像是由未在本地具有完整的文件夾結構造成的,是否可以設置S3InboundFileSynchronizingMessageSource
來創建?
當前配置:類似這樣的
public S3InboundFileSynchronizingMessageSource s3InboundFileSynchronizingMessageSource() {
S3InboundFileSynchronizingMessageSource messageSource =
new S3InboundFileSynchronizingMessageSource(file);
messageSource.setAutoCreateLocalDirectory(true);
messageSource.setLocalDirectory(new File("onComputer"));
messageSource.setLocalFilter(new AcceptOnceFileListFilter<>());
return messageSource;
感謝您的提示。因此,如果我通過x深度的壓縮(例如)的完整鵪鶉名稱,我無法使用此庫,因爲我不會提前知道完整的合格路徑嗎?我真的希望能夠使用它。 – user101010101
這也意味着如果你有一個s3桶中的許多文件,它會嘗試和同步一切,我不能說我想要x文件? – user101010101
雖然它目前不提供像[FTP/SFTP]這樣的[出站網關](http://docs.spring.io/spring-integration/reference/html/ftp.html#ftp-outbound-gateway),該模塊建立在相同的抽象 - 所以你可以使用'S3RemoteFileTemplate'列出,獲取文件等。另見[this commit](https://github.com/spring-projects/spring-integration-aws/commit/a0893cb88edb17a376f1ef874d80de98336129ad)需要一些文檔,但可用於下載和複製遠程目錄結構。 [Doc JIRA here](https://jira.spring.io/browse/INTEXT-221)。 –