关于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未到入。

posted @ 2016-11-12 21:33  孤剑者  阅读(423)  评论(0编辑  收藏  举报