Prefer method.getAnnotation(…) over AnnotationUtils.findAnnotation(…).
The latter method is much much slower than the former and JpaQueryMethod.isModifyingQuery() is invoked for every query method execution.
This commit is contained in:
@@ -83,7 +83,7 @@ public class JpaQueryMethod extends QueryMethod {
|
||||
@Override
|
||||
protected boolean isModifyingQuery() {
|
||||
|
||||
return null != AnnotationUtils.findAnnotation(method, Modifying.class);
|
||||
return null != method.getAnnotation(Modifying.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user