Annotations on sub classes will have higher priority in aop pointcut.
@@ -153,6 +153,14 @@ public class CachePointcut extends StaticMethodMatcherPointcut implements ClassF
}
private void parseByTargetClass(CacheInvokeConfig cac, Class<?> clazz, String name, Class<?>[] paramTypes) {
+ if (!clazz.isInterface() && clazz.getSuperclass() != null) {
+ parseByTargetClass(cac, clazz.getSuperclass(), name, paramTypes);
+ }
+ Class<?>[] intfs = clazz.getInterfaces();
+ for (Class<?> it : intfs) {
+ parseByTargetClass(cac, it, name, paramTypes);
+ }
+
boolean matchThis = matchesThis(clazz);
if (matchThis) {
Method[] methods = clazz.getDeclaredMethods();
@@ -163,14 +171,6 @@ public class CachePointcut extends StaticMethodMatcherPointcut implements ClassF
}
}
}
-
- if (!clazz.isInterface() && clazz.getSuperclass() != null) {
- parseByTargetClass(cac, clazz.getSuperclass(), name, paramTypes);
- }
- Class<?>[] intfs = clazz.getInterfaces();
- for (Class<?> it : intfs) {
- parseByTargetClass(cac, it, name, paramTypes);
- }
}
private boolean methodMatch(String name, Method method, Class<?>[] paramTypes) {
