【问题标题】:Spring integration sftp issueSpring集成sftp问题
【发布时间】:2018-07-20 09:58:47
【问题描述】:

我正在使用 springboot 项目版本 1.5.10.RELEASE。

我正在为 sftp 使用弹簧集成。使用以下 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'

我也在模块中集成了prometheus。

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 集成 sftp,prometheus 对所有这些服务都有效。

我尝试调试,发现将 spring-integration-core 更新为 5.0.6.RELEASE 将解决 prometheus 的问题,但这样做,我不断收到编译时问题

错误:无法访问 CoreSubscriber handler.setRemoteDirectoryExpression(new LiteralExpression(sftpRemoteDirectory));

没有找到 reactor.core.CoreSubscriber 的类文件 注意:一些输入文件使用未经检查或不安全的操作。笔记: 使用 -Xlint:unchecked 重新编译以获取详细信息。 1 个错误

请帮帮我。

【问题讨论】:

  • Spring 版本控制问题,您使用的是 Spring 5.0 和 Spring 集成的正确版本吗?
  • 如前所述,按照上述配置运行良好。当我将其更新为以下内容时,我开始面临问题。编译“org.springframework.integration:spring-integration-core:5.0.6.RELEASE” 编译“org.springframework.integration:spring-integration-file:5.0.6.RELEASE” 编译组:“org.springframework.integration” ,名称:'spring-integration-sftp',版本:'5.0.6.RELEASE' 编译组:'org.springframework.integration',名称:'spring-integration-ftp',版本:'5.0.6.RELEASE'
  • Spring Integration 5.0 需要 Boot 2.0。
  • @GaryRussell 我试过了。还是一样的错误
  • 你肯定还有不匹配的罐子;您需要让 boot 为您管理依赖项。

标签: spring spring-boot spring-integration build.gradle spring-integration-sftp


【解决方案1】:

我将所有内容移至 5.0.0.RELEASE 版本。它现在可以工作了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-02-11
    • 1970-01-01
    • 1970-01-01
    • 2014-08-06
    • 2015-11-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多