Transaction Management: Deep Dive into @Transactional
@Transactional is a Spring AOP-based annotation that wraps a method in a database transaction. Before the method starts, Spring opens a transaction (or joins an existing one). After the method returns normally, it commits. If an unchecked exception propagates out, it rolls back. The details of this behaviour are controlled by propagation, isolation, rollbackFor, and readOnly attributes.