From 8bf7195b90bf968bb3eba6497fa6a6f6de58ba93 Mon Sep 17 00:00:00 2001 From: cloudAndMonkey Date: Mon, 9 Jan 2023 14:58:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=EF=BC=8C=E5=BC=80=E6=94=BE?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=20GET=E3=80=81HEAD=20=E6=89=8D=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E4=BC=A0=20@combine:value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APIJSONORM/src/main/java/apijson/orm/AbstractParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java b/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java index f12f4c5e..b4499ee2 100755 --- a/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java +++ b/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java @@ -2194,8 +2194,8 @@ public abstract class AbstractParser implements Parser, Par if (request.get(key) instanceof JSONObject) { _method = RequestMethod.valueOf(request.getJSONObject(key).getString(apijson.JSONObject.KEY_METHOD).toUpperCase()); String combine = request.getJSONObject(key).getString(KEY_COMBINE); - if (combine != null && (_method == RequestMethod.DELETE || _method == RequestMethod.GETS || _method == RequestMethod.HEADS)) { - throw new IllegalArgumentException(key + ":{} 里的 @combine:value 不合法!DELETE,GETS,HEADS 请求不允许传 @combine:value !"); + if (combine != null && RequestMethod.isPublicMethod(_method) == false) { + throw new IllegalArgumentException(key + ":{} 里的 @combine:value 不合法!开放请求 GET、HEAD 才允许传 @combine:value !"); } } else { if (keyObjectAttributesMap.get(key) == null) {