开发者社区> 问答> 正文

springboot启动报错?报错

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-11-22 14:10:20.642 ERROR [bidding-commodity,,,] 4448 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [xxx.xxx.xxx.XXXXApplication]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/boot/autoconfigure/web/ErrorController.class] cannot be opened because it does not exist

上面是错误信息,SpringBoot版本是2.1.0

主要依赖如下:

<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
			<version>2.1.0.RELEASE</version>
		</dependency>
		
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
			<version>2.1.0.RELEASE</version>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<version>2.1.0.RELEASE</version>
			<scope>test</scope>
		</dependency>
		
		<dependency>
		    <groupId>org.springframework.cloud</groupId>
		    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
		</dependency>
		
		<dependency>
		    <groupId>org.springframework.cloud</groupId>
		    <artifactId>spring-cloud-starter-openfeign</artifactId>
		</dependency>

 

展开
收起
爱吃鱼的程序员 2020-06-06 10:41:10 1368 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>SpringBoot版本问题,降至1.5.4.RELEASE就好辣!</p>
                    
    
                        <p>各位大佬,是不是缺了依赖。</p>
                    
    
                        <p>[org/springframework/boot/autoconfigure/web/ErrorController.class] cannot be opened because it does not exist</p>
                    
    
                            回复 <a class="referer" target="_blank">@u啊welcome</a>  : 我不瞎
                        
    
                            回复 <a class="referer" target="_blank">@u啊welcome</a>  : 我知道啊!我问的是缺少那个依赖。
                        
    
                            回复 <a class="referer" target="_blank">@酸奶瓶盖儿</a>  : 它是告诉你。打不开的原因
    

    不能打开org/springframework/boot/autoconfigure/web/ErrorController.class],因为它不存在

                            ????
                        
    
                        <p>你是不是 在 启动的  application  添加  了 继承 的  什么类了   2.1.0 不需要继承  其他 类了</p> 
    

     

                            不是,是SpringBoot2.0之后没有ErrorController这个类了。
    
    2020-06-06 10:41:29
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
云栖社区特邀专家徐雷Java Spring Boot开发实战系列课程(第20讲):经典面试题与阿里等名企内部招聘求职面试技巧 立即下载
微服务架构模式与原理Spring Cloud开发实战 立即下载
阿里特邀专家徐雷Java Spring Boot开发实战系列课程(第18讲):制作Java Docker镜像与推送到DockerHub和阿里云Docker仓库 立即下载

相关实验场景

更多