当前位置: 首页 > 知识库问答 >
问题:

Spring集成sftp问题

严开宇
2023-03-14

我在springboot项目1.5.10版中工作。释放

我正在为sftp使用Spring集成。以下gradle依赖项对我来说一切都很好

compile group: 'org.springframework.integration', name: 'spring-integration-core', version: '5.0.5.RELEASE'

compile "org.springframework.integration:spring-integration-core:4.3.5.RELEASE"

compile "org.springframework.integration:spring-integration-file:4.3.5.RELEASE"

compile group: 'org.springframework.integration', name: 'spring-integration-sftp', version: '5.0.5.RELEASE'

compile group: 'org.springframework.integration', name: 'spring-integration-ftp', version: '5.0.5.RELEASE'

我还将普罗米修斯整合到模块中。

compile "io.prometheus:simpleclient:${prometheusVersion}"

compile "io.prometheus:simpleclient_hotspot:${prometheusVersion}"

compile "io.prometheus:simpleclient_spring_boot:${prometheusVersion}"

compile group: 'io.prometheus', name: 'simpleclient_servlet', version:prometheusVersion

compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: springVersion

我已经完成了普罗米修斯的所有其他要求。但是我没有得到普罗米修斯的指标。

项目中的所有其他服务都在使用prometheus,但没有使用spring integration sftp,prometheus正在为所有这些服务工作。

我尝试调试并发现将spring-Integration-core更新为5.0.6。RELEASE将修复prometheus的问题,但这样做,我继续得到编译时问题

错误:无法访问CoreSubscriber处理程序。setRemoteDirectoryExpression(新的文字表达式(sftpRemoteDirectory));

未找到reactor.core.CoreSubscriber的类文件注意:某些输入文件使用未选中或不安全的操作。注意:使用-Xlint重新编译:详细信息未选中。1错误

请帮帮我。

共有1个答案

穆丁雨
2023-03-14

我把所有东西都移动到5.0.0版。发布。它现在可以工作了。

 类似资料:
  • 我正在使用Spring集成文件/sftp模块,如何避免下载部分文件?我无法控制将文件推送到ftp/sftp的外部进程。

  • 我正在构建一个小微服务来访问来自SFTP文件服务器的文件。我决定使用Spring Integration SFTP完成这项工作。我对Spring Integration很陌生,对它的工作原理很困惑。 我的目标是在SFTP服务器上获得一个目录中的文件列表,并将它们呈现给用户界面。从那里,用户将选择一个文件进行下载,我将使用文件名将文件从SFTP服务器流式传输到用户界面。 其次,我是否需要两个接口才能

  • 我有一个用例,用户将多个csv文件放到远程目录中,然后放置ready.txt来指示文件已准备好使用。当我们的applcation在远程目录中看到ready.txt文件时,它应该开始使用sftp文件入站通道适配器将所有文件复制到本地目录,包括ready.txt。是否有办法确保readt.txt文件是最后一个要复制到本地目录的文件? 因为当文件从远程目录复制到本地目录时,我有另一个文件入站通道适配器在

  • 如何确保文件是否成功上传到SFTP服务器。我想确保SFTP上传成功,然后我只想应用其他逻辑。这是我要上传的代码。 我看到日志看起来不错。已验证文件正在上传到SFTP服务器。但不知何故,我无法确保文件正在上传到服务器上。请告知如何添加代码以确保文件上传成功。

  • 我需要将不同的文件sftp到服务器上。 在传递范围内的文件位于Windows服务器中。 为此,我考虑使用Spring集成适配器,因为我不仅需要交付文件,而且还需要为每个文件交付将元数据信息写入数据库。 您知道如何使用Spring集成将Windows文件共享上的多个文件sftp到其他服务器吗?

  • 我正在尝试通过SFTP Spring集成拉取远程文件并将其转储到本地驱动器中,并启动Spring批处理作业(步骤1读取、处理和写入),接下来是步骤2,其中一个Tasklet将下载到本地另一个位置的本地文件存档并删除下载的文件。 假设下载的文件是“data.service”、“data.maintenance”和“data.transaction”。我只处理“data.service”,但所有3个都