Receiver class o.s.c.b.BootstrapApplicationListener$CloseContextOnFailureApplicationListener does not define or inherit an impl

核能气质少年 提交于 2019-12-02 05:41:15

Your Spring Boot version is too old for your Spring Cloud version:

https://github.com/spring-cloud/spring-cloud-commons/issues/552

Spring Cloud Greenwich (2.1.x) is not compatible with spring boot 2.0.x and spring framework 5.0.x. Either update spring boot or downgrade spring cloud to Finchley.

So please update Spring Boot to 2.1.x

PS: searching on 'BootstrapApplicationListener$CloseContextOnFailureApplicationListener' would have lead you there straight away :-)

Ok - did some testing here. Created empty SpringBoot application from start.spring.io. Imported the project into IntelliJ.

I then loaded your gradle file contents. Also started by removing all the @ imports in the main (Application) class - just kept @SpringBootApplication. Removed all the other classes (including tests). Had same error. Started by removing all the gradle dependencies for Swagger and Hibernate, etc. Those are not required to get a bare-bones SpringBoot app running. Removing this line solved to error (not throwing the error anymore): compile("org.springframework.security.oauth:spring-security-oauth2")

So something needs to be configured if you want to do Spring OAuth2 ... for you to find.

Suggest you add small building blocks at a time - you have a lot of stuff in the SpringBoot main app annotated. Spring will auto-configure defaults for all it can, but you might run into similar problems. Add one annotation - write unit test class that will verify basic functionality of that specific annotation. Then enable the next one, write unit test.... unit all are working with basic test coverage.

vish Paul

This is because of spring and cloud version not compatible.

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath /> 
</parent>

The version of the parent should be an upgrade one or the same as cloud version.

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-oauth2</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!