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.
Loading...
Related Quiz
- To conditionally apply caching logic in Spring Boot, developers can use the _____ expression in caching annotations.
- In Spring Security, how can method security expressions be utilized to implement complex security constraints on service methods?
- When using @Secured annotation, what is the format to specify the required authority?
- To authorize access to method-level security in Spring Security, the _______ annotation can be used.
- In Spring Boot, using the _____ annotation in test classes allows selectively enabling parts of the application context, making tests more focused and faster.