Configure Transaction in Spring Boot
In this example, we will create an application to store user information along with his address information and will use spring transaction management to resolve the transaction break problem.
Spring Boot – Transaction Management Using @Transactional Annotation
@Transactional annotation is the metadata used for managing transactions in the Spring Boot application. To configure Spring Transaction, this annotation can be applied at the class level or method level. In an enterprise application, a transaction is a sequence of actions performed by the application that together pipelined to perform a single operation. For example, booking a flight ticket is also a transaction where the end user has to enter his information and then make a payment to book the ticket.