Skip to content
Sharp

Spring Core · interview question

Which annotation is used in Spring to define a method as part of a transaction?

Multiple choiceEasychapter-9-curatedpremiumspring-coretransactions-and-proxies
Choose one answer
Answer and explanation

Correct answer

C. @Transactional

Why

The @Transactional annotation is used in Spring to demarcate transaction boundaries. It ensures that a series of operations are executed within a transaction context, allowing for automatic commit or rollback.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →