Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/
问题
出现这个问题是因为springboot和springcloud版本不兼容
springboot和springcloud版本对应如果错了,项目是启动不起来的
解决方法
对应关系如下
spring-cloud依赖 | spring-boot依赖 |
---|---|
Finchley.M2 | >=2.0.0.M3 and <2.0.0.M5 |
Finchley.M3 | >=2.0.0.M5 and <=2.0.0.M5 |
Finchley.M4 | >=2.0.0.M6 and <=2.0.0.M6 |
Finchley.M5 | >=2.0.0.M7 and <=2.0.0.M7 |
Finchley.M6 | >=2.0.0.RC1 and <=2.0.0.RC1 |
Finchley.M7 | >=2.0.0.RC2 and <=2.0.0.RC2 |
Finchley.M9 | >=2.0.0.RELEASE and <=2.0.0.RELEASE |
Finchley.RC1 | >=2.0.1.RELEASE and <2.0.2.RELEASE |
Finchley.RC2 | >=2.0.2.RELEASE and <2.0.3.RELEASE |
Finchley.BUILD-SNAPSHOT | >=2.0.999.BUILD-SNAPSHOT and <2.1.0.M3 |
Greenwich.M1 | >=2.1.0.M3 and <2.1.0.RELEASE |
Greenwich.SR6 | >=2.1.0.RELEASE and <2.1.999.BUILD-SNAPSHOT |
Greenwich.BUILD-SNAPSHOT | >=2.1.999.BUILD-SNAPSHOT and <2.2.0.M4 |
Hoxton.SR9 | >=2.2.0.M4 and <2.3.7.BUILD-SNAPSHOT |
Hoxton.BUILD-SNAPSHOT | >=2.3.7.BUILD-SNAPSHOT and <2.4.0.M1 |
2020.0.0-M3 | >=2.4.0.M1 and <=2.4.0.M1 |
2020.0.0-M4 | >=2.4.0.M2 and <=2.4.0-M3 |
2020.0.0-M5 | >=2.4.0.M4 and <2.4.1-SNAPSHOT |
2020.0.0-SNAPSHOT | >=2.4.1-SNAPSHOT |
spring-cloud-alibaba依赖 | spring-boot依赖 |
---|---|
2.2.1.RELEASE | >=2.2.0.RELEASE and <2.3.0.M1 |