简体   繁体   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">

because of this file, I get following error: 由于此文件,出现以下错误:

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]

I'm trying really hard to make this work, but I'm out of ideas...help anyone? 我真的很努力地使这项工作可行,但是我没有主意...可以帮助任何人吗?

Looks like you have a mix of versions in your classpath. 看起来您的类路径中混合了多个版本。

I guess the picture is like: 我猜图片是这样的:

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

When you upgrade to a new version you should do that for all Spring Integration modules at the same time. 升级到新版本时,应该同时对所有Spring Integration模块执行此操作。

The best way to achieve that is to use some Dependency Management tool like Maven or Gradle, when you can specify the version for bounded artifacts as a one variable in one place. 实现此目标的最佳方法是使用Maven或Gradle之类的依赖管理工具,当您可以将有界工件的版本指定为一个位置的一个变量时。 During upgrade you'll just change that variable and that's all. 在升级过程中,您只需更改该变量即可。

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

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