This a task manager Spring Boot application using Hexagonal architecture with a low framework coupling that consumes Json place holder api
- Java - Version: 17
- Spring - Version: 3.1.5
- Maven - Version: 3.8.6 (Optional)
OBS: First of all, look at application.yml and change the database configuration for yours
you can use this example:
jdbc:mysql://<your_database_host>:<your_database_port>/<your_database_name>?useSSL=false&serverTimezone=UTC
mvn clean install
After that:
java -jar target/hexagonal-0.0.1-SNAPSHOT.jar
mvn spring-boot:run
docker build -t image_name .
After that:
docker run image_name
You'll see messagem saying it's running on port 8080
open your localhost:8080
mvn test
POST
/
Body:
{
"title": "Play with TĂș",
"description": "play with her bird",
"completed": false
}
Retun:
{
"id": 2,
"title": "Play with TĂș",
"description": "play with her bird",
"createdAt": null,
"completed": false
}
GET
/{taskId}
Retun:
{
"id": 2,
"title": "Play with TĂș",
"description": "play with her bird",
"createdAt": null,
"completed": false
}
GET
/
Retun:
[
{
"id": 2,
"title": "Play with TĂș",
"description": "play with her bird",
"createdAt": null,
"completed": false
},
{
"id": 2,
"title": "Play with TĂș",
"description": "play with her bird",
"createdAt": null,
"completed": false
}
]
GET
/{taskId}/additionalInfo
Retun:
{
"userId": 1,
"userName": "Leanne Graham",
"userEmail": "[email protected]"
}
PUT
/{taskId}
Body:
{
"title": "Play with TĂș",
"description": "play with her bird",
"completed": false
}
Retun:
{
"id": 2,
"title": "Play with TĂș",
"description": "play with her bird",
"createdAt": null,
"completed": false
}
DELETE
/{taskId}
Retun:
Status 204
Error on using this architecture because it's decoupled from framework
- You need to do manual dependency injection
Documentation with Swagger