Which of the following is the most efficient way to manage transactions in a Spring Boot application utilizing Spring Data JPA?

  • Using programmatic transaction management with the PlatformTransactionManager interface.
  • Using database-specific transaction management provided by the database system.
  • Using declarative transaction management with the @Transactional annotation.
  • Manually committing and rolling back transactions using SQL commands.
The most efficient way to manage transactions in a Spring Boot application utilizing Spring Data JPA is by using declarative transaction management with the @Transactional annotation. It simplifies transaction handling and provides better readability and maintainability. The other options may work but are not considered as efficient and convenient as declarative transaction management.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *