spring-boot - 创建名为“compositeCompatibilityVerifier”的 bean 时出错
问题描述
我正在使用Spring Boot 2.5.5
,Spring Cloud Version 2020.0.4
但是当我尝试运行应用程序时,我遇到了异常 -
Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'compositeCompatibilityVerifier' defined in class path resource [org/springframework
/cloud/configuration/CompatibilityVerifierAutoConfiguration.class]: Bean instantiation
via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.cloud.configuration.CompositeCompatibilityVerifier]: Factory
method 'compositeCompatibilityVerifier' threw exception; nested exception is
org.springframework.cloud.configuration.CompatibilityNotMetException
pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>2020.0.4</spring-cloud.version>
</properties>
<dependencies>
<!-- Below jar file also has same Spring Boot Version -->
<dependency>
<groupId>com.another.project</groupId>
<artifactId>commons</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<!-- other spring boot dependency -->
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
我有另一个项目jar
,pom
其中也有同样Spring Boot Version
的问题,我怀疑会导致问题,但不确定如何?
解决方案
推荐阅读
- node.js - 如何在 CentOS 上安装最新的 Nodejs?
- c# - 不能使用特性“声明表达式”,因为它不是 C# 6.0 语言规范的一部分
- api - 在 vue.js 3 上的已创建函数上过滤值不为空或不为空的 JSON 对象
- python - Django-只能将str(不是“ManyRelatedManager”)连接到str
- azure - 用于具有多个容器的存储帐户的 ARM 模板
- android - Webview 网页不可用 ERR_FILE_NOT_FOUND
- javascript - 我的 javascript 计算器无法正常工作
- python - 如何替换python中列表列表中的列
- javascript - vue中如何使用fetch存储json数据
- python-3.x - 如何在特定条件下将 nan 替换为 1