Summary
In this chapter, we covered various aspects of integrating a Micronaut application with relational as well as NoSQL databases. We explored different ways of persistence integration, that is, using ORM (Hibernate), a persistence framework (MyBatis), or a driver-based framework (MongoDB Sync). In each technique, we covered, in depth, how to define entities, relationships, repositories, and services. Each microservice defined a simple command-line utility to exhibit common CRUD operations.
This chapter has given us the skills to cover almost all the data access aspects in Micronaut. In the rest of the book, we will further explore and use these skills and learnings by doing more hands-on exercises and covering other aspects of the Micronaut framework.
In the next chapter, we will work on the web layer of the pet-clinic
application, defining various REST endpoints in all the microservices.