1

I am trying to implement AOP but when I implement org.springframework.aop.MethodBeforeAdvice interface then HijackBeforeMethod class gives inconsistent error in Eclipse ID.

package aop;

import java.lang.reflect.Method;

public class HijackBeforeMethod implements org.springframework.aop.MethodBeforeAdvice{

    @Override
    public void before(Method arg0, Object[] arg1, Object arg2)
        throws Throwable {
    // TODO Auto-generated method stub

    }

}
4

2 回答 2

3

aopalliance.jar 必须在类路径中。

于 2014-11-12T17:16:14.787 回答
1

我面临着同样的问题。

解决方案:-首先我使用的是 spring-3.0 jars,然后我还添加了 spring2.5 jars。我的类路径包含 3.0 和 2.5 jars。现在它正在工作。但我不确定它显示的是哪个特定的 jars 问题.

于 2013-11-09T03:53:38.690 回答