intermediateTransactions — @Transactional, Propagation & Isolation
Does a checked exception automatically roll back a @Transactional method by default?
No — Spring's default rollback rule only triggers automatically for unchecked exceptions (RuntimeException and subclasses). A checked exception requires explicitly configuring rollbackFor = SomeException.class, or the transaction will commit despite the exception being thrown.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.
Does a checked exception automatically roll back a @Transactional method by default?