更正,开放请求 GET、HEAD 才允许传 @combine:value

This commit is contained in:
cloudAndMonkey 2023-01-09 14:58:30 +08:00 committed by GitHub
parent e94c44fb14
commit 8bf7195b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2194,8 +2194,8 @@ public abstract class AbstractParser<T extends Object> implements Parser<T>, Par
if (request.get(key) instanceof JSONObject) { if (request.get(key) instanceof JSONObject) {
_method = RequestMethod.valueOf(request.getJSONObject(key).getString(apijson.JSONObject.KEY_METHOD).toUpperCase()); _method = RequestMethod.valueOf(request.getJSONObject(key).getString(apijson.JSONObject.KEY_METHOD).toUpperCase());
String combine = request.getJSONObject(key).getString(KEY_COMBINE); String combine = request.getJSONObject(key).getString(KEY_COMBINE);
if (combine != null && (_method == RequestMethod.DELETE || _method == RequestMethod.GETS || _method == RequestMethod.HEADS)) { if (combine != null && RequestMethod.isPublicMethod(_method) == false) {
throw new IllegalArgumentException(key + ":{} 里的 @combine:value 不合法!DELETE,GETS,HEADS 请求不允许传 @combine:value !"); throw new IllegalArgumentException(key + ":{} 里的 @combine:value 不合法!开放请求 GET、HEAD 才允许传 @combine:value !");
} }
} else { } else {
if (keyObjectAttributesMap.get(key) == null) { if (keyObjectAttributesMap.get(key) == null) {