1
JavaBeginner#spring
It marks a method or class as requiring a database transaction, managed via a proxy that begins a transaction before the method runs and commits/rolls back afterward based on success or exceptions, respecting the configured propagation and isolation settings.
@Transactional
public void transferFunds(Long from, Long to, double amount) {
debit(from, amount);
credit(to, amount); // if this throws, debit() is rolled back too
}