Which annotation is primarily used in Spring Data JPA to mark a class as a JPA entity?

  • @Controller
  • @Entity
  • @Repository
  • @Service
The primary annotation used in Spring Data JPA to mark a class as a JPA entity is @Entity. This annotation indicates that the class represents a persistent entity that can be stored in a relational database using JPA. The other annotations listed are not used for marking classes as JPA entities; they serve different purposes in the Spring framework.
Add your answer
Loading...

Leave a comment

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