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

时间:2018-12-25 08:08:44

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

任何人都可以启发我应该在Spring boot 2.0.0 .RELEASE中使用哪个org.apache.camel 版本。

当我使用新的apache.camel版本(例如2.21.0)时,遇到了RelaxedPropertyResolved错误。我阅读了论坛,并被告知降级我无法使用的Spring Boot的版本。我必须在新的apache.camel.version上使用sprint.boot.version 2.0.0,而无需在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

1 个答案:

答案 0 :(得分:0)

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