-
@author 波波烤鸭
-
@email [email protected]
*/
public interface SomeService {
public void doSome();
}
/**
-
目标对象
-
@author 波波烤鸭
-
@email [email protected]
*/
public class SomeServiceImpl implements SomeService {
@Override
public void doSome() {
System.out.println(“目标对象…方法执行了”);
}
}
[](()3.创建通知
/**
-
前置通知
-
需要实现MethodBeforeAdvice接口
-
@author 波波烤鸭
-
@email [email protected]
*/
public class MyMethodBeforeAdvice implements MethodBeforeAdvice {
/**
-
method 目标方法
-
args 目标方法参数列表
-
target 目标对象
*/
@