Spring Boot 1.3.1 and Oauth2



所以我在让oauth2spring-boot.1.3.1.RELEASE上工作时遇到了问题。

spring-boot使用spring 4.2.4spring-security-oauth2.2.0.8使用旧的4.0.9版本。

这是一个maven项目,一旦我添加了spring-security-oauth2依赖项,我就无法启动tomcat,因为它报告

No class definition error
Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/GenericApplicationListener

依赖关系层次结构在附加的图像中看起来像。

有没有办法让它们一起工作,或者我必须恢复到旧的spring-boot版本?

依赖层次结构

好的,所以我通过在我的项目结构的父POM中定义parent来解决它

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

以前,我的maven结构仅基于spring-boot-starter-webspring-security-oauth2依赖关系。

最新更新