Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 启动spring启动应用程序时出现bean创建错误_Java_Spring_Maven_Spring Cloud_Openfeign - Fatal编程技术网

Java 启动spring启动应用程序时出现bean创建错误

Java 启动spring启动应用程序时出现bean创建错误,java,spring,maven,spring-cloud,openfeign,Java,Spring,Maven,Spring Cloud,Openfeign,当我尝试运行spring boot应用程序时,出现以下异常: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebind

当我尝试运行spring boot应用程序时,出现以下异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@3764951d]
我认为这是版本不兼容。我在pom.xml中导入了open-feign,之后它就不起作用了,但我不知道如何修复它。我使用open-feign 2.2.5.RELEASE。 这里是my pom.xml:


4.0.0
org.springframework.boot
spring启动程序父级
2.4.0
微型服务
私家车
0.0.1-快照
私家车
SpringBoot的演示项目
15
${java.version}
${java.version}
Hoxton.SR8
org.springframework.cloud
spring云依赖关系
${spring cloud.version}
聚甲醛
进口
org.springframework.boot
弹簧靴起动器
org.springframework.cloud
春季云启动程序
org.projectlombok
龙目
真的
org.springframework.boot
弹簧起动试验
测试
org.testng
testng
释放
测试
雅加达
jakarta.validation-api
2.0.2
编译
org.springframework.data
spring数据共享
2.4.1
编译
org.springframework.boot
springbootmaven插件

这似乎是SpringBoot与云服务版本兼容性的问题。
是否有任何一点可以让我们从整体上看到Spring框架伞的版本兼容性矩阵?谢谢

为了详细说明@M-deinum的评论,将Spring Boot版本设置为
2.3.4。发行版
(而不是我的
2.4.2
)解决了这个问题。在
gradle
中,这意味着改变:

plugins {
    id 'org.springframework.boot' version '2.4.2'
    ...
}


您需要将spring启动版本更改为已发布版本


org.springframework.boot
spring启动程序父级
2.4.0


org.springframework.boot
spring启动程序父级
2.3.3.2发布

afaik,目前没有与Spring Boot 2.4兼容的Spring云版本。降级弹簧防尘套.2020.0.0-M6兼容。GA本月晚些时候发布依赖项org.testng:testng:release不存在。。。最好改用JUnit Jupiter…此外,我怀疑
spring数据共享:2.4.1
是否正确…保留通过父级继承的版本…我使用spring Initializer()查找SpringBoot和spring云服务之间的版本兼容性。选择依赖项并单击“浏览”按钮时,将看到一个具有兼容版本的pom.xml文件
plugins {
    id 'org.springframework.boot' version '2.3.4.RELEASE'
    ...
}
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.4.0</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.3.RELEASE</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>