一、前言

最近小编在学习springcloud的项目知识,初出茅庐,跟着视频敲,发现不对劲。视频出的时间太早了,导致和现在的SpringBoot版本不一样,这是个头疼的问题,一个不小心就版本不兼容。击退你的学习信心的往往不是复杂的技术和业务,而是简简单单的环境版本问题。下面跟着小编一起解决问题吧!!

二、报错信息(省略部分)

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans]: Factory method 'configurationPropertiesBeans' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadataat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.10.jar:5.3.10]at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.10.jar:5.3.10]... 34 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadataat org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration.configurationPropertiesBeans(ConfigurationPropertiesRebinderAutoConfiguration.java:56) ~[spring-cloud-context-2.1.3.RELEASE.jar:2.1.3.RELEASE]at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$1b4f1aed.CGLIB$configurationPropertiesBeans$2(<generated>) ~[spring-cloud-context-2.1.3.RELEASE.jar:2.1.3.RELEASE]at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$1b4f1aed$$FastClassBySpringCGLIB$$92bb4cd3.invoke(<generated>) ~[spring-cloud-context-2.1.3.RELEASE.jar:2.1.3.RELEASE]at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.10.jar:5.3.10]at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.10.jar:5.3.10]at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$1b4f1aed.configurationPropertiesBeans(<generated>) ~[spring-cloud-context-2.1.3.RELEASE.jar:2.1.3.RELEASE]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.10.jar:5.3.10]... 35 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadataat java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_121]at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_121]at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_121]at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_121]... 46 common frames omittedDisconnected from the target VM, address: '127.0.0.1:53071', transport: 'socket'Process finished with exit code 1

三、解决问题

不难发现是因为Springboot和SpringCloud版本不兼容,我们打开:—>Spring Cloud官网,找到对应的版本对照,果然官网不会骗人哈,这样就可以解决问题了。大家跟着自己的版本进行对照选择!!


这里不是很详细,我们可以去Github上看详细版的:—>springboot与springcloud详细对照信息

小编的是根据视频的springboot版本是2.1.8,所以对应Greenwich.SR6

四、总结

找了这么久恍然发现,一定要看官网,不然你要走好多弯路。


推广自己网站时间到了!!!

点击访问!欢迎访问,里面也是有很多好的文章哦!

【已解决】Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.相关推荐

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

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

  2. 解决Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication

    这是错误信息,怪吓人的,是在导入项目后,启动发生报错,这个错误一般是有maven依赖错误导致的:推测是没有使用国内镜像,国外依赖下载不下来: 我之前因为idea崩溃重装过一次,所以需要修改使用的mav ...

  3. Caused by java.lang.ClassNotFoundException org.springframework.boot.context

    原因是springboot版本与springcloud版本不匹配, 查看对应匹配规则 可以看到我的gulimall-coupon项目的springboot版本是2.1.8,而我的springcloud ...

  4. Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context

    原因是springboot版本与springcloud版本不匹配, 查看对应匹配规则 可以看到我的gulimall-coupon项目的springboot版本是2.1.8,而我的springcloud ...

  5. Caused by: java.lang.ClassNotFoundException: org.springframework.boot.Bootstrapper导致原因

    最近在写项目时,采用renren-fast后端,启动时,报了org.springframework.boot.Bootstrapper一个异常,网上查阅信息,确实是Spring Boot 依赖版本和S ...

  6. 出现 **caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.autoconfigure.en

    出现 caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.autoconfigure.endpo ...

  7. Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.health.OrderedHealthAg

    依赖添加 <dependency><groupId>org.springframework.boot</groupId><artifactId>spri ...

  8. java.lang.NoClassDefFoundError: org/springframework/boot/context/embedded/FilterRegistrationBean

    java.lang.NoClassDefFoundError: org/springframework/boot/context/embedded/FilterRegistrationBean 昨天还 ...

  9. springboot 2.x: java.lang.ClassNotFoundException: org.springframework.boot.bind.RelaxedDataBinder

    springboot 2.x 集成druid,引入的依赖为: <dependency><groupId>com.alibaba</groupId><artif ...

最新文章

  1. 今年央视春晚的创意担当,给了这个1岁的拓荒牛机器人
  2. 存clob为空的值_oracle clob 存储空间
  3. 再译《A *路径搜索入门》之四
  4. 读书笔记--模板与泛型编程
  5. extjs 获取id的值_Extjs combox获取显示值和ID值
  6. CURL POST PHP
  7. Centos7安装官方JDK
  8. 一公司的面试题(泛型和数组的问题)
  9. http://www.codeproject.com/Articles/11596/XPTable-NET-ListView-meets-Java-s-JTable
  10. 小程序版聊天室|聊天小程序|仿微信聊天界面小程序
  11. Python基础教程
  12. 泰坦尼克号生还率预测分析
  13. 上古卷轴5:重制版AFT管理随从导致瑟拉娜Serana有关的MOD眼睛变金色的问题解决
  14. Docker部署服务(二)上传镜像至Habor
  15. EXCEL应用:数据可视化终极教程
  16. ASR 混合高斯模型GMM的理解
  17. 【Altium秘籍】room 复制报错的解决办法
  18. 计算机应用投稿建议,计算机类核心期刊投稿心得【转】 - 计算机软件及计算机应用 - 电子技术及信息科学 - C......
  19. 同济子豪兄-机器学习基础
  20. asp功放怎么装_功放音响安装—教您如何安装功放音响

热门文章

  1. 转转推荐场景EE题解决思路
  2. 什么叫做java类的全限定名
  3. 使用Dronekit控制无人机,DroneKit配置
  4. 在SQLServer处理中的一些问题及解决方法
  5. 微信小程序布局干货——来自微信官方
  6. MACD指标使用的一些小技巧
  7. cocos2dx android游戏防破解总结
  8. 银行卡开户及交易项目--Oracle
  9. 如何修正XY轴不垂直误差
  10. 什么是单元测试(unit testing)