1
0
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:
DMJYY 2023-12-03 09:21:32 +08:00 committed by GitHub
parent 7b0d616dcb
commit 9c0e7f5a36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());