Package structure of the Order Management API
Let us have a look at what our package structure looks like for the Order Management API:

Figure 4.5 – Package structure of implemented Order Management API
Here, we can see that the Order Management API follows the same architectural approach as described in Chapter 2, following the principles of clean architecture. Let us look at the contained packages:
adapter
: This package contains the four following packages:exception
: This contains all class exceptions and exception handlersinbound.rest
: This is responsible for handling all the inputs, transformations, and generated data from the specificationmapper
: This contains all the mapper transformations between objects, such astoOrderRequest
fromOrderRequestBodyDto
, and the custom-defined mappers.outbound
: This package contains all elements that interact with external services, such as databases and other services...