2021-04-11 17:03:57 +02:00
2021-04-11 15:04:40 +02:00
2021-04-10 23:24:31 +02:00
2021-04-10 23:20:45 +02:00
2021-04-11 12:57:07 +02:00
2021-04-10 23:24:31 +02:00
2021-04-10 23:24:31 +02:00

hexagonal-example

Implementation of a hexagonal architecture in Spring Boot.

Most of the information on how to design in this way are from the following books:

Get your hands dirty on clean architecture | Tom Hombergs

Clean Architecture: A Craftsman's Guide to Software Structure and Design | Robert C. Martin

Implementing Domain-Driven Design | Vernon Vaughn

How to run

To run this application you need to first run a

mvn clean install

in the root directory of this project. This will download all required dependecies and bundle your project properly.

The database for this application is a mongo db. You either need to have one running on your system, or you can alternatively start the MongoDB in docker with the included docker-compose file.

docker-compose -f mongodb-docker-compose up

Docker / docker-compose need to be installed for this.

The application can then be started by running the main function in:

hexagonal-example\config\src\main\java\de\strasser\peter\hexagonal\HexagonalApplication.java

What does this application do

This app can register customers, add addresses to these customers and retrieve a list of all customers.

The supported usecases in the business layer can be inspected in the applicationmodule. Under application/src/main/java/de/strasser/peter/hexagonal/application/customer/port all the supported operations are clearly visible, which is a major selling point to structure your application in this way.

img_1.png

Application architecture

img_2.png

Description
Implementation of a customer service in an hexagonal architecture
Readme 2.7 MiB
Languages
Java 100%