2

我已经使用最新的可用版本建立了一个新的 Spring Boot + Spring Integration + Spring Integration Java DSL 项目。该项目构建良好,但是,当我运行应用程序时,我得到:

Caused by: java.lang.NoSuchMethodError: org.springframework.integration.dsl.StandardIntegrationFlow.isRegisterComponents()Z
    at org.springframework.integration.dsl.config.IntegrationFlowBeanPostProcessor.processStandardIntegrationFlow(IntegrationFlowBeanPostProcessor.java:139) ~[spring-integration-java-dsl-1.2.3.RELEASE.jar:?]
    at org.springframework.integration.dsl.config.IntegrationFlowBeanPostProcessor.postProcessBeforeInitialization(IntegrationFlowBeanPostProcessor.java:100) ~[spring-integration-java-dsl-1.2.3.RELEASE.jar:?]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:423) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1702) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]

当前使用的依赖项如下:

compile ("org.springframework.boot:spring-boot-starter:2.0.0.RC1") {
    exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
}
compile "org.springframework.boot:spring-boot-starter-data-jpa:2.0.0.RC1"
compile "org.springframework.boot:spring-boot-starter-log4j2:2.0.0.RC1"
compile "org.springframework.integration:spring-integration-core:5.0.1.RELEASE"
compile "org.springframework.integration:spring-integration-http:5.0.1.RELEASE"
compile "org.springframework.integration:spring-integration-jms:5.0.1.RELEASE"
compile "org.springframework.integration:spring-integration-java-dsl:1.2.3.RELEASE"

错误可能是由于 jar 版本的错误组合造成的吗?我不确定如何调试此错误。

4

1 回答 1

7

当您5.0已经使用 Spring Integration 时,您不需要那种额外的spring-integration-java-dsl依赖。自版本以来,它已被合并到核心项目中5.0

在迁移指南Spring Integration Java DSL项目的该页面上查看更多信息。

于 2018-02-12T16:58:49.597 回答