This is a Spring Boot application in Java to illustrate the Hexagonal Architecture in Java.
-
To build the application run the command: mvn clean install
-
To run a Spring Boot module run the command: mvn spring-boot:run
curl --location --request GET 'http://localhost:8080/api/v1/product'
curl --location --request GET 'http://localhost:8080/api/v1/product/5'
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"
}'
curl --location --request DELETE 'http://localhost:8080/api/v1/product/5'