Which of the following is a true statement about transaction management in Spring Data JPA?

  • Spring Data JPA automatically manages transactions when using the @Repository annotation.
  • Transaction management is not supported in Spring Data JPA.
  • Developers need to manually configure transactions for Spring Data JPA repositories.
  • Spring Data JPA only supports read-only transactions.
Transaction management in Spring Data JPA requires manual configuration. Spring Data JPA doesn't automatically manage transactions. Developers typically use the @Transactional annotation or XML-based configuration to specify transaction boundaries for methods in their repositories. The other options are not accurate; Spring Data JPA can handle both read and write transactions, and it does not require manual configuration for all repositories.
Add your answer
Loading...

Leave a comment

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