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>
<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这个类了。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。