From 0dc3d65307ed45fc12429b65cd6cd038c160e4c9 Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Tue, 10 Jul 2018 15:25:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=AF=B9Rest=E4=B8=ADfind?= =?UTF-8?q?=E3=80=81delete=E5=BC=80=E5=A4=B4=E6=96=B9=E6=B3=95=E7=9A=84?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/org/redkale/net/http/Rest.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/org/redkale/net/http/Rest.java b/src/org/redkale/net/http/Rest.java index b2c459a40..7b1940f53 100644 --- a/src/org/redkale/net/http/Rest.java +++ b/src/org/redkale/net/http/Rest.java @@ -27,7 +27,6 @@ import org.redkale.util.*; import org.redkale.source.Flipper; /** - * 以find开头的方法且参数只有一个且参数类型为primitive class或String,则RestParam值默认为# *

* 详情见: https://redkale.org * @@ -988,10 +987,6 @@ public final class Rest { throw new RuntimeException("Parameter " + param.getName() + " not found name by @RestParam in " + method); } } - if (annhead == null && anncookie == null && annaddr == null && annbody == null && annfile == null - && (entry.name.startsWith("find") || entry.name.startsWith("delete")) && params.length == 1) { - if (ptype.isPrimitive() || ptype == String.class) n = "#"; - } if (annhead == null && anncookie == null && annsid == null && annaddr == null && annbody == null && annfile == null && !ptype.isPrimitive() && ptype != String.class && ptype != Flipper.class && !CompletionHandler.class.isAssignableFrom(ptype) && !ptype.getName().startsWith("java") && n.charAt(0) != '#' && !"&".equals(n)) { //判断Json对象是否包含@RestUploadFile @@ -1843,12 +1838,6 @@ public final class Rest { break; } } - if (!pound && params.length == 1) { - Class ptype = method.getParameterTypes()[0]; - if (this.name.startsWith("find") || this.name.startsWith("delete")) { - if (ptype.isPrimitive() || ptype == String.class) pound = true; - } - } this.existsPound = pound; }