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

spring-config文件中的spring-integration-sftp的旧版本给出了XML错误,但3.0.2版本给出了出站通道适配器的错误

龙默
2023-03-14
<bean id="sftpSessionFactory"
    class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
    <property name="host" value="${seaWorldOrlando.sftp.host}" />
    <property name="port" value="${seaWorldOrlando.sftp.port}" />
    <property name="user" value="${seaWorldOrlando.sftp.user}" />
    <property name="password" value="${seaWorldOrlando.sftp.password}" />
</bean>

<int-sftp:outbound-channel-adapter
    id="sftpOutboundAdapter" channel="toFtp" charset="UTF-8"
    remote-directory="/home/request" session-factory="sftpSessionFactory" />

spring-integration-config文件的开头如下:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-amqp="http://www.springframework.org/schema/integration/amqp"
xmlns:rabbit="http://www.springframework.org/schema/rabbit"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:int-ftp="http://www.springframework.org/schema/integration/ftp"
xmlns:int-file="http://www.springframework.org/schema/integration/file"
xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:batch="http://www.springframework.org/schema/batch" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/integration/amqp http://www.springframework.org/schema/integration/amqp/spring-integration-amqp.xsd
                    http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-3.0.xsd
                    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd 
                    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
                    http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-3.0.xsd
                    http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file.xsd
                    http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-3.0.xsd
                    http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
                    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
                    http://www.springframework.org/schema/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd                 
                    http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.1.xsd">

共有1个答案

彭星津
2023-03-14

我们建议完全不要使用XSD的版本。框架从类路径中读取最新的一个。它允许您在升级后避免更改。

另一方面,如果您提到3.0.2,请确保使用了正确的Spring集成JAR。而且都应该是同一个版本。

如果您对允许的属性有一些疑问,请查看正确的XSD,如果它们存在的话。您可以在适当的jar中找到它们,例如org/springframework/integration/sftp/config/spring-integration-sftp-3.0.xsd

 类似资料:
  • 我有一个模型对象,它是在多次转换和解析之后填充的。现在,我需要使用spring集成将模型中的消息属性发送给kafka。我可以使用messageKey方法构造键,但如何从m.getPayload()之类的模型中获取实际消息。getMessage()并将其发送给Kafka。

  • 问题内容: 谁能解释默认情况下如何在我的计算机上运行python 2.6?似乎 指向2.7,所以似乎没有给我正确的信息。 当我产生错误时,我看到了真正正在运行的东西。为什么会这样呢? 我该如何纠正呢? - - 编辑: - - 从评论中的建议: 问题答案: Bash使用内部哈希表来优化查找。当您在您的较早位置安装了一个与现有程序同名的新程序时,Bash对此一无所知,并继续使用旧程序。该可执行文件做了

  • 我在实现某些功能时遇到了一些问题,当我删除文件时,我注意到了一些不一致。 1)当我删除多个文件时,有时并不是所有文件都被转移到正确的目录。

  • 我试图根据用户使用calandar类输入的日期来确定一天是否是周末。但是当我打印出当天的值时,我得到了不正确的输出。 这是我的代码: 但是输出

  • 我在摆弄弹力靴,但每向前走一步,就会让我后退两步。 我将我的简单应用程序与Springboot连接在一起,但我没有得到这个错误: 还有这一点: 我不用任何数据库。应用程序非常简单。下面是主要的类: 下面是其他两个类和: 就是这样。尽管它可能很简单。 下面是文件结构以及build.gradle文件内容: 能有人请帮助我让这个小程序运行,指出我在正确的方向,以解决这个问题? 事先好心谢谢你。