advancedSpring Transactions312 of 469

@Transactional on a private method: what actually happens?

Tests whether you know proxy-based AOP can only intercept calls that go through the proxy's public/protected method dispatch -- a private method can't be overridden by a subclass proxy (or exposed by a JDK dynamic proxy interface), so the annotation is silently ignored.

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

← Back to all Spring Boot & Microservices questions