Solution: Quarkus Data
Explore how to integrate databases in Quarkus using Hibernate Panache and MongoDB through active record and repository patterns. Understand entity definitions, service creation, and REST resource setup for handling data operations in your applications.
We'll cover the following...
We'll cover the following...
Solution
For the below solution, we used the following Quarkus extensions:
- RESTEasy
- RESTEasy Jackson
- Panache Hibernate
- Panache MongoDB
package io.educative;
import io.quarkus.test.junit.QuarkusIntegrationTest;
@QuarkusIntegrationTest
public class GreetingResourceIT extends GreetingResourceTest {
// Execute the same tests but in packaged mode.
}
Quarkus data challenge solution
In the above code, to access the databases, we defined different classes depending on the use case.
Note: In the solution, we used both active record and ...