Skip to content

Commit 8bf7195

Browse files
更正,开放请求 GET、HEAD 才允许传 @combine:value
1 parent e94c44f commit 8bf7195

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2194,8 +2194,8 @@ private JSONObject batchVerify(RequestMethod method, String tag, int version, St
21942194
if (request.get(key) instanceof JSONObject) {
21952195
_method = RequestMethod.valueOf(request.getJSONObject(key).getString(apijson.JSONObject.KEY_METHOD).toUpperCase());
21962196
String combine = request.getJSONObject(key).getString(KEY_COMBINE);
2197-
if (combine != null && (_method == RequestMethod.DELETE || _method == RequestMethod.GETS || _method == RequestMethod.HEADS)) {
2198-
throw new IllegalArgumentException(key + ":{} 里的 @combine:value 不合法!DELETE,GETS,HEADS 请求不允许传 @combine:value !");
2197+
if (combine != null && RequestMethod.isPublicMethod(_method) == false) {
2198+
throw new IllegalArgumentException(key + ":{} 里的 @combine:value 不合法!开放请求 GET、HEAD 才允许传 @combine:value !");
21992199
}
22002200
} else {
22012201
if (keyObjectAttributesMap.get(key) == null) {

0 commit comments

Comments
 (0)