Chapter objectives
By the end of this chapter, we will have layers inside our microservices that look like the following:
The Protocol layer handles protocol-specific logic. It is very thin, only consisting of the RestController annotations in the api project and the common GlobalControllerExceptionHandler in the util project. The main functionality of each microservice resides in each Service layer. The product-composite service contains an Integration layer used to handle the communication with the three core microservices. The core microservices will all have a Persistence layer used for communicating with their databases.We will be able to access data stored in MongoDB with a command like the following:
docker compose exec mongodb mongosh product-db --quiet --eval "db.products.find()"
The result of the command should look like the following:
Regarding data stored...