@Transactional

@Transactional

  • @Transactional on method means that the entire method will run in a single transaction. If any exception occurs during the execution of this method, the transaction will be rolled back, ensuring data consistency