Spring / Spring Data Access
Does the transaction rollback on exception in spring declarative transaction management?
By default configuration only unchecked exceptions (that is, subclasses of java.lang.RuntimeException) are rollbacked and the transaction will still be commited in case of checked exceptions.
To enable rollbacking on checked exceptions add the parameter rollBackFor to the @Transactional attribute, for example, rollbackFor=Exception.class.
@Transactional(rollbackFor = Exception.class)
More Related questions...