关于The hierarchy of the type TestBeforeAdvice is inconsistent的问题

今天准备写一个spring aop的demo,创建了TestBeforeAdvice类,该类实现了MethodBeforeAdvice接口,eclipse报了"The hierarchy of the type TestBeforeAdvice is inconsistent"的错误。

后百度找到原因:spring-aop.jar要依赖aopalliance.jar,所以需要导入aopalliance.jar。

以后碰到该问题,可考虑是否有依赖的jar未到入。

原文地址:https://www.cnblogs.com/gujianzhe/p/6057617.html