In Spring Boot, the _____ annotation is used to indicate a component whose role is to represent a data repository.

  • @Component
  • @Controller
  • @Entity
  • @Repository
In Spring Boot, the @Repository annotation is used to indicate a component whose role is to represent a data repository. It is typically applied to classes that interact with a database, providing data access operations. @Component is a more general-purpose annotation, and @Entity is used to represent persistent entities in JPA. @Controller is used for defining controllers in Spring MVC.
Add your answer
Loading...

Leave a comment

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