java.lang.ClassNotFoundException:org.aspectj.util.PartialOrder $PartialComparable

前端之家收集整理的这篇文章主要介绍了java.lang.ClassNotFoundException:org.aspectj.util.PartialOrder $PartialComparable前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我在我的Web应用程序中使用Spring 4.2.4.RELEASE,我想从中删除对aspectjweaver.jar的依赖.我不直接使用AOP,我当然不使用AspectJ.但我的应用程序失败,出现以下异常:

java.lang.ClassNotFoundException: org.aspectj.util.PartialOrder$PartialComparable
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:450)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:510)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)
at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.sortAdvisors(AspectJAwareAdvisorAutoProxyCreator.java:73)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:91)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:69)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:346)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:298)
at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapablebeanfactory.java:422)

有什么方法可以完全删除对aspectjweaver.jar的依赖吗?

最佳答案
在Spring Boot中使用@Component注释的类上使用@Transactional注释时遇到此问题类似于:https://spring.io/guides/gs/managing-transactions/

解决它的最简单方法添加适当的Maven依赖项:

原文链接:https://www.f2er.com/spring/431874.html

猜你在找的Spring相关文章