advancedAspect-Oriented Programming (AOP)

What do @Transactional, @Async, and @PreAuthorize have in common under the hood?

All three are built-in Spring AOP aspects sharing the exact same proxy-based interception mechanism — which is also why all three share the identical self-invocation limitation: calling any of them from within the same class bypasses the proxy entirely.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Why is @Around the only AOP advice type that can change a method's return value, and what's the risk in writing one?← Back to all Spring Boot questions