Spring批处理FTP文件

布莱恩·瓦格(Bryan Wagon):

我正在使用Spring Batch ItemReader从数据库读取数据,然后使用FlatFileItemWriter将数据写入文件。

将数据写入文件后,我需要将此特定文件传输到FTP服务器。我可以通过Spring Batch做到这一点,还是应该使用Spring Integration您能否也提供一个例子?

Artem Bilan:

结合两个框架没有错。他们真的很顺利地合作。

既然您说您已经有一个Spring Batch ItemReader并且可以使用来将其写入文件FlatFileItemWriter,那么您将有一个完整的解决方案。

最后,您可以使用提供参考消息的反馈来获取文件,并使用Spring Integration FTP出站通道适配器将其发送到FTP。

在Spring Batch Docs中查看更多信息:https : //docs.spring.io/spring-batch/4.2.x/reference/html/spring-batch-integration.html#providing-feedback-with-informational-messages

在有关FTP支持的Spring Integration中:https : //docs.spring.io/spring-integration/docs/current/reference/html/#ftp

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章