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

前端 未结 3 669
时光取名叫无心
时光取名叫无心 2021-01-25 01:54

I\'m facing this error while running the project. I\'m unable to know the cause of the error and unable to find a solution online as well. This project is running over another l

3条回答
  •  温柔的废话
    2021-01-25 02:58

    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.

提交回复
热议问题