CamelContextAware 已由更新版本的 Java Runtime 编译

CamelContextAware has been compiled by a more recent version of the Java Runtime

我有这个错误

org/apache/camel/CamelContextAware has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

当我尝试在 Spring Boot Camel 应用程序中编译 Maven 时。 文档中没有对这个错误的解释,我唯一找到的是 very short javadoc。你能帮帮我吗?

问题出在这里

    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-test-spring-junit5</artifactId>
        <version>3.15.0</version>
        <scope>test</scope>
    </dependency>

设置版本 3.12.0 为我解决了。