Skip to content

Spring Boot example approach for implementing a Hexagonal Architecture

Notifications You must be signed in to change notification settings

nd-jar/spring-boot-hexagonal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Hexagonal

Project shows, how to use hexagonal architecture in your spring boot applications

Hexagonal Architecture

Implemented integrations:

  • Mysql (Spring Data JPA)
  • Redis (Spring Data Redis)

Prerequisites

  • JDK 17
  • this project uses Lombok, so enable annotation processing in your IDE
  • this project uses Testcontainers, so run Docker on your local machine

Getting Started

gradle testBootRun

Project Structure

└──com/
    └── yourcompany/
        ├── adapter/                # Adapter logic
        │   ├── in/                 # Incoming requests adapters
        │   │   └── http/
        │   └── out/                # Outgoing requests adapters
        │       ├── cache/
        │       ├── kafka/
        │       └── persistense/
        ├── application             # Core logic
        │   ├── domain/
        │   │   ├── model/
        │   │   └── service/
        │   └── port/               # Core logic API
        │       ├── in/
        │       └── out/
        └── common/                 # Neither business logic nor adapters

See More

About

Spring Boot example approach for implementing a Hexagonal Architecture

Resources

Stars

Watchers

Forks

Languages

  • Java 100.0%