spring - apache.camel 与 Spring.Boot v2.0 的不兼容版本

标签 spring spring-boot apache-camel spring-camel

任何人都可以告诉我哪个 org.apache.camel 版本应该与 Spring boot 版本 2.0.0 .RELEASE 一起使用。

当我使用较新版本的 apache.camel (例如 2.21.0 )时,我遇到了 RelaxedPropertyResolved 错误。我阅读了论坛,并被告知要降级 Spring Boot 的版本,但我不能。我必须将 sprint.boot.version 2.0.0 与新的 apache.camel.version 一起使用,而不对我的 java 代码进行更改?

你觉得可能吗?

这些是我对camel.version和spring.boot.version的依赖。如果您需要更多信息,请告诉我。

         <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-bom</artifactId>
            <version>${camel.version}</version>
            <type>pom</type>
            <scope>import</scope>
            <version>2.21.0
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>${spring.boot.version}</version>
            <type>pom</type>
            <scope>import</scope>
            <version>2.21.0</version>
        </dependency>

错误:

at com.project.eventrouter.Application.main(Application.java:26)
Caused by: java.lang.IllegalStateException: Could not evaluate condition on 
org.apache.camel.spring.boot.security.CamelSSLAutoConfiguration due to 
org/springframework/boot/bind/RelaxedPropertyResolver not found. Make sure 
your own configuration does not rely on that class. This can also happen if 
you are @ComponentScanning a springframework package (e.g. if you put a 
@ComponentScan in the default package by mistake)
org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:55)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:109)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:217)
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:606)
... 13 common frames omitted

最佳答案

  • Camel 2.21.x 或更早版本是 Spring Boot 1.5.x
  • Camel 2.22.x 仅适用于 Spring Boot 2.0.x
  • Camel 2.23.x 是 Spring Boot 2.1.x(也可能是 Spring Boot 2.0.x)

关于spring - apache.camel 与 Spring.Boot v2.0 的不兼容版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53920513/

相关文章:

java - Spring 启动 WebClient : Closes connection prematurely before response

spring - WEB-INF 未添加到 Spring Boot jar 中

java - 如何在Camel中的路由之间传递异常

java - 如何循环 json 并将每个索引发布到camelcontext中

java - 是否可以将 activemq 代理嵌入到我的 servlet 容器中?

java - 使用输入列表获取实体对象列表 : Spring Data JPA - Hibernate

javascript - (Spring,AngularJS)我不知道为什么它是NULL

eclipse - 无法在Jipster示例应用程序Gradle中运行Eclipse中的Junits

java - PostMapping Service Rest with Spring boot错误请求方法 'POST'不支持

java - Apache Camel - 从 JVM 崩溃中恢复