背景

在使用springboot集成Spring Cloud的时候报错:
Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBean
这是由于springboot 版本和springcloud 版本不一致导致。

解决

一开始试了好几次都不行,springboot使用的就是最新版,而Cloud使用的阿里比较久的版本,后来在Spring的官网上,终于在Spring Cloud的wiki上找到了Spring Boot, Spring Cloud Alibaba,Spring Cloud之间的版本对应关系。下边是官网的介绍:

毕业版本依赖关系(推荐使用)
由于 Spring Boot 2.4+ 和以下版本之间变化较大,目前企业级客户老项目相关 Spring Boot 版本仍停留在 Spring Boot 2.4 以下,为了同时满足存量用户和新用户不同需求,社区以 Spring Boot 2.4 为分界线,同时维护2.2.x 和 2021.x 两个分支迭代

2021.x 分支

适配 Spring Boot 2.4, Spring Cloud 2021.x 版本及以上的 Spring Cloud Alibaba 版本如下表(最新版本用*标记): (注意,该分支 Spring Cloud Alibaba 版本命名方式进行了调整, 未来将对应 Spring Cloud 版本, 前三位为 Spring Cloud 版本,最后一位为扩展版本,比如适配 Spring Cloud 2021.0.1 版本对应的 Spring Cloud Alibaba 第一个版本为:2021.0.1.0,第个二版本为:2021.0.1.1,依此类推)

Spring Cloud Alibaba Version Spring Cloud Version Spring Boot Version
2021.0.1.0* Spring Cloud 2021.0.1 2.6.3
2021.1 Spring Cloud 2020.0.1 2.4.2

2.2.x 分支

适配 Spring Boot 为 2.4, Spring Cloud Hoxton 版本及以下的 Spring Cloud Alibaba 版本如下表(最新版本用*标记):

Spring Cloud Alibaba Version Spring Cloud Version Spring Boot Version
2.2.8.RELEASE* Spring Cloud Hoxton.SR12 2.3.12.RELEASE
2.2.7.RELEASE Spring Cloud Hoxton.SR12 2.3.12.RELEASE
2.2.6.RELEASE Spring Cloud Hoxton.SR12 2.3.12.RELEASE
2.1.4.RELEASE Spring Cloud Greenwich.SR6 2.1.13.RELEASE
2.2.1.RELEASE Spring Cloud Hoxton.SR3 2.2.5.RELEASE
2.2.0.RELEASE Spring Cloud Hoxton.RELEASE 2.2.X.RELEASE
2.1.2.RELEASE Spring Cloud Greenwich 2.1.X.RELEASE
2.0.4.RELEASE(停止维护,建议升级) Spring Cloud Finchley 2.0.X.RELEASE
1.5.1.RELEASE(停止维护,建议升级) Spring Cloud Edgware 1.5.X.RELEASE

组件版本关系

每个 Spring Cloud Alibaba 版本及其自身所适配的各组件对应版本如下表所示:

Spring Cloud Alibaba Version Sentinel Version Nacos Version RocketMQ Version Dubbo Version Seata Version
2.2.8.RELEASE 1.8.4 2.1.0 4.9.3 ~ 1.5.1
2021.0.1.0 1.8.3 1.4.2 4.9.2 ~ 1.4.2
2.2.7.RELEASE 1.8.1 2.0.3 4.6.1 2.7.13 1.3.0
2.2.6.RELEASE 1.8.1 1.4.2 4.4.0 2.7.8 1.3.0
2021.1 or 2.2.5.RELEASE or 2.1.4.RELEASE or 2.0.4.RELEASE 1.8.0 1.4.1 4.4.0 2.7.8 1.3.0
2.2.3.RELEASE or 2.1.3.RELEASE or 2.0.3.RELEASE 1.8.0 1.3.3 4.4.0 2.7.8 1.3.0
2.2.1.RELEASE or 2.1.2.RELEASE or 2.0.2.RELEASE 1.7.1 1.2.1 4.4.0 2.7.6 1.2.0
2.2.0.RELEASE 1.7.1 1.1.4 4.4.0 2.7.4.1 1.0.0
2.1.1.RELEASE or 2.0.1.RELEASE or 1.5.1.RELEASE 1.7.0 1.1.4 4.4.0 2.7.3 0.9.0
2.1.0.RELEASE or 2.0.0.RELEASE or 1.5.0.RELEASE 1.6.3 1.1.1 4.4.0 2.7.3 0.7.1

大家根据自己的版本选择对应的组件版本就好了!
另外附上官网的组件版本对应地址:spring cloud官网集成组件版本对应说明

Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBean相关推荐

  1. failed to introspect Class[org.springframework.cloud.context.properties.ConfigurationPropertiesBea]

    截取部分报错日志信息如下 ERROR 22004 --- [ main] o.s.boot.SpringApplication : Application run failed #springboot ...

  2. IDEA| java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context

    问题:java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.pr ...

  3. Failed to introspect Class [org.springframework.cloud.gateway.config.GatewayAutoConfiguration$NettyC

    今天碰到一个版本的问题,搭建gateway.idea运行.maven工程来的. 起初运行一直卡在这,无法进入SpringBoot启动的界面 java.lang.IllegalStateExceptio ...

  4. 【spring_Cloud】java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud

    java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix.eurek ...

  5. 【已解决】Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.

    一.前言 最近小编在学习springcloud的项目知识,初出茅庐,跟着视频敲,发现不对劲.视频出的时间太早了,导致和现在的SpringBoot版本不一样,这是个头疼的问题,一个不小心就版本不兼容.击 ...

  6. springboot日志自定义路径无效及出现org.springframework.boot.context.properties.bind.BindException错误

    1.org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'l ...

  7. Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.Configurati

    我出现这个错误的原因是,我的maven priject里面子模块下有依赖爆红,这时候因为这个子模块是父工程里面定义的,所以没有定义版本,也不用定义版本,但是因为报错了,我尝试着在子工程中定义了版本这时 ...

  8. springcloud出现org.springframework.boot.context.properties.ConfigurationPropertie错误

    原因是spring boot项目版本和spring cloud版本不兼容,换spring cloud对应版本 boot和cloud的版本选型 Ⅰ.进入springcloud官方页面:https://s ...

  9. Failed to introspect Class FeignClientFactoryBean 异常排查

    报错说明 BeanCreationException: Error creating bean with name 'com.xxx.XxxClient': Lookup method resolut ...

最新文章

  1. 使用WinINet和WinHTTP实现Http訪问
  2. python调用js库中的函数_Python 调用JS文件中的函数
  3. android 36 线程通信
  4. mysql temporary_MySQL中的两种临时表
  5. 使用movetable收缩表空间
  6. html中的文档格式及举例,跟我一起从零开始学习WebAssembly(三)、最简单的例子hello world(使用自定义HTML模板)...
  7. 前端学习(786):数组创建的两种方式
  8. Hadoop本地运行模式了解~
  9. python-object-twoxml-html_1
  10. gc:C语言的垃圾回收库-中文
  11. messagebox 全部使用_你一定要知道的Windows 10系统的使用技巧
  12. Keras中文文档:图像预处理ImageDataGenerator 类详细学习记录
  13. 干货满满!全面详解如何用递归解题!
  14. kali 安装grub theme
  15. php模拟登陆正方教务系统csdn,curl模拟登陆正方教务系统查成绩,出现Object moved to here,已登陆首页获取cookie...
  16. 草根站长的创业路:说说这两年的创业经历
  17. apng2gif各种问题的解决
  18. 《码农翻身》各章节阅读连接
  19. 使用 Wall 搭建个人照片墙和视频墙
  20. 日语动词里的未然形、连用形、终止形、连体形、假定形、命令形、推量形各代表的意思

热门文章

  1. 亚马逊防关联怎么做?软关联硬关联有什么?
  2. [QT_015]Qt学习之基于条目控件的自定义特性(拖拽+右键菜单+样式)
  3. 【微信小程序】断点调试一
  4. 中国互联网公司应该从雅虎的衰落中学到什么?
  5. 《算法分析与设计》练习14
  6. 拯救懒癌、码农、减肥人士的代餐,有多大的掘金前景
  7. STM32CbueMX之USB挂载内存虚拟U盘
  8. 第四章第二节数据资产盘点-数据资产盘点方法伦
  9. 【信号处理】Matlab实现语音变速变调
  10. 北京内推 | 微软研究院科学智能中心招聘多模态学习方向研究实习生