今天在使用IDEA,基于Spring boot创建Spring cloud的maven项目时,创建成功后,无法正确启动,报错信息如下:
11:56:52.081 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:161)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:102)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:68)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at com.microservice.hystrix.dashboard.HystrixDashboardApplication.main(HystrixDashboardApplication.java:12)
此时尝试修改Spring cloud和Spring boot的版本,Spring boot版本修改为2.2.1.RELEASE,Spring cloud版本修改为Hoxton.RELEAE。再次启动时,正常。说明出现该问题是由于Spring cloud和Spring boot版本不匹配导致,如下是Spring cloud和Spring boot的版本对应关系(来自官网)。
Release Train | Boot version |
Hoxton | 2.2.x |
Greenwich | 2.1.x |
Finchley | 2.0.x |
Edgware | 1.5.x |
Dalston | 1.5.x |
相关推荐
基于 Spring Cloud 2021 、Spring Boot 2.7、 OAuth2 的 RBAC 权限管理系统源码
spring boot , spring cloud alibaba, spring cloub 版本选型
Spring cloud spring boot spring boot admin。spring demo,
Spring boot 是 Spring 的一套快速配置脚手架,可以基于spring boot 快速开发单个微服务,Spring Cloud是一个基于Spring Boot实现的云应用开发工具;Spring boot专注于快速、方便集成的单个个体,Spring Cloud是关注...
spring cloud 是基于Spring Cloud的云分布式后台管理系统架构,核心技术采用Eureka、Fegin、Ribbon、Zuul、Hystrix、Security、OAth、Mybatis、Ace-cache等主要框架和中间件,UI采用Bootstrap、jquery等前端组件 ...
基于 Spring Cloud Hoxton 、Spring Boot 2.2、 OAuth2 的RBAC权限管理系统 基于数据驱动视图的理念封装 Ant Design Vue,即使没有 vue 的使用经验也能快速上手 提供 lambda 、stream api 、webflux 的生产实践 ...
Spring Boot简化了基于Spring的应用开发,通过少量的代码就能创建一个独立的、产品级别的Spring应用。Spring Boot为Spring平台及第三方库提供开箱即用的设置,这样你就可以有条不紊地开始。多数Spring Boot应用只...
Spring Cloud系列教程 Spring Boot Spring Cloud Stream 和 Kafka案例教程 SpringCloud系列教程、SpringBoot、 Stream、Kafka、案例教程
系统说明:基于 Spring Cloud 2021 、Spring Boot 2.6、 OAuth2 的 RBAC 权限管理系统 基于数据驱动视图的理念封装 element-ui,即使没有 vue 的使用经验也能快速上手 提供对常见容器化支持 Docker、Kubernetes、...
介绍一个基于Spring Boot 3.0、Spring Cloud 2022 & Alibaba的微服务RBAC权限管理系统。该系统可以实现微服务RBAC权限管理,通过RBAC权限管理机制对用户访问系统的权限进行限制,从而提高系统的安全性和可用性。同时...
Spring cloud与Spring boot完整案例分析,注解详细,希望对大家有帮助。
采用目前主流的微服务系统架构 SpringBoot+SpringCloud+SpringData进行开发,前端技术采用Vue.js 。系统整体分为 三大部分:微服务、网站前台、网站管理后台。功能模块包括文章、问答、招聘、活 动、吐槽、交友、...
基于spring boot及spring cloud的微服务框架搭建简明指南
spring cloud和spring boot 两个视频教程
主要是介绍微服务的,spring boot + spring cloud,文档中有下载地址,
3.Spring Cloud中服务的发现与消费 4.Eureka中的核心概念 5.什么是客户端负载均衡 6.Spring RestTemplate中几种常见的请求方式 7.RestTemplate的逆袭之路,从发送请求到负载均衡 8.Spring Cloud中负载均衡器...
springCloud-分享版: 基于Spring Cloud、OAuth2.0的前后端分离的系统。 通用RBAC权限设计及其数据权限和分库分表 支持服务限流、动态路由、灰度发布、 支持常见登录方式, 多系统SSO登录 基于 Spring Cloud Hoxton ...
基于SpringBoot+SpringCloud的高校线上课程报名服务系统源码。 全国高校线上课程报名服务系统统平台。 基于SpringBoot+SpringCloud微服务架构,采用前后端分离开发模式进行开发。包括后台管理系统和前台用户系统。 ...
springCloud是基于SpringBoot的一整套实现微服务的框架。他提供了微服务开发所需的配置管理、服务发现、断路器、智能路由、微代理、控制总线、全局锁、决策竞选、分布式会话和集群状态管理等组件。最重要的是, 跟...