Skip to content

A Spring Boot application illustrating hexagonal architecture in Java

Notifications You must be signed in to change notification settings

alexsouza/hexagonal-architecture

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a Spring Boot application in Java to illustrate the Hexagonal Architecture in Java.

Relevant article:

Build the application

  1. To build the application run the command: mvn clean install

  2. To run a Spring Boot module run the command: mvn spring-boot:run

The following REST endpoints are exposed:

1. Retrieve all products:

curl --location --request GET 'http://localhost:8080/api/v1/product'

2. Retrieve a specific product:

curl --location --request GET 'http://localhost:8080/api/v1/product/5'

3. Create products:

curl --location --request POST 'http://localhost:8080/api/v1/product'
--header 'Content-Type: application/json'
--data-raw '{ "productId": 5, "type": "Mobile Phone", "description": "Apple iPhone 11" }'

curl --location --request POST 'http://localhost:8080/api/v1/product'
--header 'Content-Type: application/json'
--data-raw '{ "productId": 1, "type" : "Laptop", "description" : "Lenovo Thinkpad" }'

4. Remove a specific product:

curl --location --request DELETE 'http://localhost:8080/api/v1/product/5'

About

A Spring Boot application illustrating hexagonal architecture in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%