Skip to content
Sharp

Spring Core · interview question

Why might Spring transactions not work as expected when invoking a transactional method within the same class?

Multiple choiceHardchapter-9-curatedpremiumspring-corepersistence-and-validation
Choose one answer
Answer and explanation

Correct answer

C. Self-invocation bypasses proxies

Why

Spring transactions rely on proxies, and self-invocation bypasses these proxies. This means that transactional behavior defined by AOP will not apply to method calls within the same class, potentially leading to unexpected results.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →