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.
Loading...
Related Quiz
- How can groups be used in Bean Validation to perform partial validation in Spring Boot?
- _____ is the Spring Cloud component that simplifies the deployment of microservices by providing solutions to common patterns in distributed systems.
- When testing Spring Boot applications, how can you isolate the test context for a specific part of the application, such as a web layer?
- How can you customize the token endpoint response of an OAuth2 Authorization Server in Spring Boot?
- In a distributed environment, using Spring Boot, cache synchronization can be achieved efficiently through _____.