使用springboot 1.2.2版本和spring security oauth 2.0.7版本时出现NoTouchMethod错误

使用springboot 1.2.2版本和spring security oauth 2.0.7版本时出现NoTouchMethod错误,spring,oauth,spring-security,spring-boot,Spring,Oauth,Spring Security,Spring Boot,我使用的是springboot版本: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.2.2.RELEASE</version> </parent 您正在尝试使用不符合Spring Boot要求的S

我使用的是springboot版本:

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

您正在尝试使用不符合Spring Boot要求的Spring Framework版本

如前所述,Spring Boot 1.2.2需要Spring Framework 4.1.3或更高版本。isAllowEagerClassLoading已添加到SpringFramework 4.1.2中的DefaultListableBeanFactory中,因此您必须使用4.1.1或更早版本

理想情况下,您应该删除Spring框架依赖项版本的任何手动配置,并允许从Spring boot starter父级继承的依赖项管理接管控制权。否则,应手动指定兼容版本

<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.0.7.RELEASE</version>
java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.isAllowEagerClassLoading()Z
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.get(BeanTypeRegistry.java:147)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:158)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:147)