From 9c0e7f5a3692812596c7c2b82d4e33e2054132f8 Mon Sep 17 00:00:00 2001 From: DMJYY <43092211+DMJYY@users.noreply.github.com> Date: Sun, 3 Dec 2023 09:21:32 +0800 Subject: [PATCH] Update proxy.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JDK动态代理代码示例的第三点,重写invoacationHandler的invoke方法,没有加@Override注解 --- docs/java/basis/proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/java/basis/proxy.md b/docs/java/basis/proxy.md index 85902688..615b0f00 100644 --- a/docs/java/basis/proxy.md +++ b/docs/java/basis/proxy.md @@ -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());