From 87442a5c59893bbca11892bbb4502253af9153ac Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Fri, 13 Oct 2017 18:42:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=99=A8=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=AF=B9=E8=B1=A1=EF=BC=8C=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E9=9D=9E=E4=B8=9A=E5=8A=A1=E6=96=B9=E6=B3=95=E7=9A=84=E6=89=A7?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 1 + .../com/xxl/job/core/rpc/netcom/NetComClientProxy.java | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index a540066f..2dde25f4 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -1024,6 +1024,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 3、修复任务监控线程被耗时任务阻塞的问题; - 4、修复任务监控线程无法监控任务触发和执行状态均未0的问题; - 5、调度中心项目日志配置改为xml文件格式; +- 6、执行器动态代理对象,拦截非业务方法的执行; ### TODO LIST - 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限; diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/rpc/netcom/NetComClientProxy.java b/xxl-job-core/src/main/java/com/xxl/job/core/rpc/netcom/NetComClientProxy.java index b71a3534..b0343fc7 100644 --- a/xxl-job-core/src/main/java/com/xxl/job/core/rpc/netcom/NetComClientProxy.java +++ b/xxl-job-core/src/main/java/com/xxl/job/core/rpc/netcom/NetComClientProxy.java @@ -36,6 +36,12 @@ public class NetComClientProxy implements FactoryBean { new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + + // filter method like "Object.toString()" + if (Object.class.getName().equals(method.getDeclaringClass().getName())) { + logger.error(">>>>>>>>>>> xxl-rpc proxy class-method not support [{}.{}]", method.getDeclaringClass().getName(), method.getName()); + throw new RuntimeException("xxl-rpc proxy class-method not support"); + } // request RpcRequest request = new RpcRequest(); @@ -46,7 +52,7 @@ public class NetComClientProxy implements FactoryBean { request.setMethodName(method.getName()); request.setParameterTypes(method.getParameterTypes()); request.setParameters(args); - + // send RpcResponse response = client.send(request);