In a Spring Data JPA repository, which annotation is used to annotate a custom query when the derived query mechanism is not sufficient?
- @Query
- @CustomQuery
- @CustomMethod
- @CustomRepo
In Spring Data JPA, when the derived query mechanism is not sufficient, you can annotate a custom query method with the @Query annotation. This annotation allows you to define custom queries using JPQL or native SQL. There's no @CustomQuery annotation in Spring Data JPA, and the other options mentioned are not standard annotations for this purpose.
Loading...
Related Quiz
- In OAuth2, the _____ grant type is used by clients to exchange user credentials for an access token.
- When configuring Global Method Security, which attribute determines the order in which the security annotations are evaluated?
- Reactive Streams in Spring Boot offer _____ to handle the flow of data between the producer and consumer.
- For configuring a DataSource programmatically in Spring Boot, you can create a @Bean of type _____.
- In Spring Boot, which module enables the development of reactive applications?