diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java index 97a1a5db8ae8..c83d6e1406cd 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java @@ -545,7 +545,8 @@ private static boolean compiledByAjc(Class clazz) { return true; } } - return false; + Class superclass = clazz.getSuperclass(); + return (superclass != null && compiledByAjc(superclass)); }