任何人都可以告诉我哪个 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/