mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-12 06:53:42 +08:00
优化ApiArgumentResolver
This commit is contained in:
@@ -28,9 +28,8 @@ public class ApiArgumentResolver implements HandlerMethodArgumentResolver {
|
||||
}
|
||||
boolean hasAnnotation = methodParameter.getMethodAnnotation(ApiMapping.class) != null
|
||||
|| methodParameter.getMethodAnnotation(ApiAbility.class) != null;
|
||||
boolean isFirstParameter = methodParameter.getParameterIndex() == 0;
|
||||
// 有注解,并且是第一个参数
|
||||
return hasAnnotation && isFirstParameter;
|
||||
// 有注解
|
||||
return hasAnnotation;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user