由于NoSuchMethodError,所有bean在启动时都会失败自动装配

时间:2018-01-30 20:23:32

标签: java spring

将我的项目升级到Spring AOP 4.3.7之后,我在Spring Boot启动时的每个bean自动连线上都得到了这个错误跟踪:

Caused by: java.lang.NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lang/Object;)Ljava/lang/Object;
    at org.springframework.context.event.AbstractApplicationEventMulticaster.addApplicationListener(AbstractApplicationEventMulticaster.java:105)
    at org.springframework.context.support.AbstractApplicationContext.addApplicationListener(AbstractApplicationContext.java:494)
    at org.springframework.context.support.ApplicationListenerDetector.postProcessAfterInitialization(ApplicationListenerDetector.java:78)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:423)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1633)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
...Stack truncated here for privacy reasons...

我明白这是堆栈中某处的Spring AOP Jar中的不匹配,但是找不到任何引用实际对象的东西。

1 个答案:

答案 0 :(得分:0)

我能够通过升级到Spring AOP 4.3.13解决这个问题

请参阅API中这些库的oldnew版本的这些链接。