PrepZone Logo
PrepZone
Back to Spring Boot

Spring Boot · Medium

How do you roll back transactions in Spring Boot?

Spring BootJPA & TransactionsTransactionsSeniorStaff

Answer preview

Default rollback behavior: Spring automatically rolls back a transaction when an unchecked exception (RuntimeException or Error) propagates out of a @Transactional method. Checked exceptions do NOT trigger rollback by default.…