Spring AOP interception method does not take effect

problem description

writes a section to intercept methods that contain specified annotations. The
runtime finds that if a subclass An inherits the abstract parent class B and implements the parent"s abstract method, adding a specified comment to the subclass"s rewrite method, it finds that the method cannot be intercepted when called.

who can give me an explanation and a solution?

related codes

// 
public @interface Profiling {
}
// 
public class B {
    public abstract void foo();
}
// 
public class A extent B {
    // Profiling
    @Profiling
    @Override
    public void foo() {
        // do something
    }
}
// 
public class Aspect {
    @Pointcut("@annotation(com.base.Profiling)")
    private void pointCut(){
    }

    @Around("pointCut()")
    public Object around(ProceedingJoinPoint pjp) {
        // do something
    }
}

it is not clear what the subject's profile is. The subject can check that the
1, Aspect classes need to be managed by Spring and marked as @ org.aspectj.lang.annotation.Aspect .
2, A classes need to be managed by Spring. The processing logic for
3, @ Around annotations should be:

  https://codeshelper.com/a/11. 

Menu