mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-08-05 20:31:37 +08:00
Update proxy.md
JDK动态代理代码示例的第三点,重写invoacationHandler的invoke方法,没有加@Override注解
This commit is contained in:
parent
7b0d616dcb
commit
9c0e7f5a36
@ -208,7 +208,7 @@ public class DebugInvocationHandler implements InvocationHandler {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws InvocationTargetException, IllegalAccessException {
|
||||
//调用方法之前,我们可以添加自己的操作
|
||||
System.out.println("before method " + method.getName());
|
||||
|
Loading…
x
Reference in New Issue
Block a user