简体   繁体   English

spring-config文件中旧版本的spring-integration-sftp给出XML错误,而3.0.2版给出outbound-channel-adapter的错误。

[英]Old versions of spring-integration-sftp in the spring-config file give the XML error but version 3.0.2 gives the error for outbound-channel-adapter

Please see the beginning of the spring-integration-config file below. 请参阅下面的spring-integration-config文件的开头。 If I have the reference to spring-integration-sftp (not version 3.02.) in the schema location I am receiving the following error: 如果在架构位置中引用了spring-integration-sftp(不是3.02版),则会收到以下错误:

Referenced file contains errors ( http://www.springframework.org/schema/integration/spring-integration-2.0.xsd ). 引用的文件包含错误( http://www.springframework.org/schema/integration/spring-integration-2.0.xsd )。

However, if I switch to the 3.0.2 version of spring-integration-sftp I am getting the following error: 但是,如果切换到spring-integration-sftp的3.0.2版本,则会出现以下错误:

The matching wildcard is strict, but no declaration can be found for element 'int-sftp:outbound-channel-adapter'. 匹配的通配符很严格,但是找不到元素'int-sftp:outbound-channel-adapter'的声明。

The spring-integration-config.xml code related to spring-integration-sftp is as follows: 与spring-integration-sftp相关的spring-integration-config.xml代码如下:

<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" />

The beginning of the spring-integration-config file is as follows: 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">

Our recommendation do not use versions for XSD at all. 我们的建议完全不使用XSD版本。 The framework read the latest one from classpath. 该框架从classpath中读取了最新的框架。 it allow you to avoid changes after upgrade. 它使您避免升级后进行更改。

From other side, if you mention 3.0.2 be sure you use correct jars of Spring Integration. 另一方面,如果您提到3.0.2,请确保使用正确的Spring Integration jar。 And all of them should be the same version. 它们都应该是相同的版本。

If you have some doubts with allowed attributes, take a look into correct XSD, if they are present. 如果对允许的属性有疑问,请查看正确的XSD(如果存在)。 You can find them in the appropriate jar, eg org/springframework/integration/sftp/config/spring-integration-sftp-3.0.xsd . 您可以在适当的jar中找到它们,例如org/springframework/integration/sftp/config/spring-integration-sftp-3.0.xsd

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring Integration outbound-channel-adapter destination-expression MQMDMessageContext - Spring Integration outbound-channel-adapter destination-expression MQMDMessageContext Spring-Integration-Kafka出站通道适配器发送消息 - Spring-Integration-Kafka outbound-channel-adapter Send message int-jms 的 Java 配置:来自 Spring 集成的出站通道适配器 - Java configuration for int-jms:outbound-channel-adapter from spring integration Spring Integration Java DSL中的JPA出站通道适配器配置 - JPA outbound channel adapter config in Spring Integration Java DSL Spring集成kafka出站适配器错误句柄 - Spring integration kafka outbound adapter error handle 没有弹簧集成的出站通道适配器 - Outbound Channel Adapter without spring integration 将远程文件下载到本地文件系统后,如何配置spring-integration-sftp来移动它? - How to configure spring-integration-sftp to move a remote file after it has been downloaded to local filesystem? 通道到多个出站通道适配器 - Channel to multiple outbound-channel-adapter 消息异常:sftp出站通道适配器中的org.springframework.messaging.MessageDeliveryException - Messaging exception: org.springframework.messaging.MessageDeliveryException in sftp outbound-channel-adapter 与DSL的Spring集成:间隔10分钟后,文件出站通道适配器可以创建文件吗? - Spring Integration with DSL: Can File Outbound Channel Adapter create file after say 10 mins of interval
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM