Spring 引导 1.3.1 和 Oauth2

Spring Boot 1.3.1 and Oauth2

所以我无法让 oauth2 处理 spring-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 版本?

Dependency hierarchy

好的,所以我通过在我的项目结构 POM 的父 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 依赖项。