Skip to content
Sharp

Spring Core · interview question

In a Spring Boot application, what is a potential risk of using self-invocation for a method annotated with @Transactional?

Multiple choiceMediumchapter-9-curatedpremiumspring-coredtos-and-entities
Choose one answer
Answer and explanation

Correct answer

A. Transaction may not be initiated.

Why

Self-invocation bypasses Spring's proxy mechanism, which means that the @Transactional annotation will not be applied. As a result, the method will execute without a transaction, potentially leading to inconsistent data states.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →