繁体   English   中英

Spring Integration 4.1-4.2迁移

[英]Spring Integration 4.1-4.2 migration

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

由于此文件,出现以下错误:

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: You cannot use prior versions of Spring Integration schemas with Spring Integration 4.2. Please upgrade your schema declarations or use versionless aliases (e.g. spring-integration.xsd).
Offending resource: class path resource [com/improvedigital/yield360/services/status/ctx/application-config.xml]

我真的很努力地使这项工作可行,但是我没有主意...可以帮助任何人吗?

看起来您的类路径中混合了多个版本。

我猜图片是这样的:

  1. 您有spring-integration-core-4.2.x
  2. 您的spring-integration-http ,spring-integration-xml , spring-integration-amqp or spring-integration-core-event is of version 4.1.x`。

升级到新版本时,应该同时对所有Spring Integration模块执行此操作。

实现此目标的最佳方法是使用Maven或Gradle之类的依赖管理工具,当您可以将有界工件的版本指定为一个位置的一个变量时。 在升级过程中,您只需更改该变量即可。

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM