2.3 Application Structure
Getting familiar with the application.
Code Structure
The application in this lab is structured as follows:
monolith-application: Base directory for code or artifacts belonging to theapplicationcontainermonolith-application/src/main/docker: Dockerfiles to build application and containermonolith-application/src/main/java/ch/puzzle/mm/monolith/: Location where most of the java application code residesmonolith-application/src/main/resources/db: contains the database migration scripts
The java code is structured by domains and the sub folders boundary, control and entity. Beside domains there are
also helpers. For example the package monkey which contains a basic ChaosMonkey to inject errors.
Domains
In the application we have the following domains:
article: Static article managementorder: Handles the management of the order and initiates the stock managementstock: Represents a stock management and handles the amount of items in stock
The most important classes in the application are:
order/boundary/ShopOrderResource.java: Provides the RESTful API endpoint for creating a new orderorder/control/ShopOrderService.java: Handles the effective creation of the order and triggers the stock managementstock/control/ArticleStockService.java: Handles the effective management of the items in stock
Task 2.3.1 - Inspecting application structure
- Have a look at the
/code/monolithfolder and get familiar with the application structure.
Last modified February 12, 2024: fix debezium lab version (9e6013e)