更正,开放请求 GET、HEAD 才允许传 @combine:value
This commit is contained in:
parent
e94c44fb14
commit
8bf7195b90
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user