spring-boot - Spring集成Java DSL错误

标签 spring-boot spring-integration spring-integration-dsl

我已经使用最新的可用版本建立了一个新的 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 版本组合错误造成的?我不知道如何调试这个错误。

最佳答案

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

查看更多信息Migration Guide并在该页面上显示Spring Integration Java DSL项目。

关于spring-boot - Spring集成Java DSL错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48751562/

相关文章:

java - 如何使依赖注入(inject)对组件起作用

spring - @ExtendWith(SpringExtension.class) 不工作

spring-integration - Spring 集成 DSL Scatter-Gather 多个收件人流的异步/并行执行

java - Spring 集成: Allocate Space when sending file to FTP

java - 从 Spring 集成流程中调用 Spring Controller

java - Spring集成Java DSL : strategy to handle errors/exceptions?

java - Spring Boot 示例文件未找到错误

java - Spring 启动。执行 saveAndFlush 并修改实体结果为未保存的 transient 异常

java - 如何将字符串转换为 XML 文件?

java - 如何使用 Spring Integration 处理来自 AWS SQS FiFo 队列的超过 10 个并发消息