The @Repository annotation in Spring Boot is particularly useful when working with _____ to interact with the database.

  • @EntityManager
  • @Service
  • @JpaRepository
  • @DataSource
The @Repository annotation in Spring Boot is particularly useful when working with @JpaRepository to interact with the database. @JpaRepository is a Spring Data JPA-specific repository interface that provides out-of-the-box CRUD (Create, Read, Update, Delete) operations. While @Service and other options can be used in Spring applications, they are not typically associated with database interaction like @Repository and @JpaRepository.
Add your answer
Loading...

Leave a comment

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