A Java / Gradle / Spring Boot (v.3.0.4) / REST API service that can be connected to the todo app Angular project.
A simple Todolist application REST service, that connect with a PostgreSQL database.
- Discovery of Spring Framework : inversion of control, dependency injection, annotations...
- Writing a RESTful service using annotations, supporting JSON requests and responses
- Personnalized exceptions
- Spring Data integration
- Entities to Dto mapping with Mapstruct
- Unit testing with JUnit 5, Mockito
- Documentation test with Spring RestDocs
- Integration test with DBSetup, RestAssured
- Docker Compose
GET /todolist
Accept: application/json
Content-Type: application/json
{
"id": "0464c4ee-9f34-492a-bc6f-f105ca841c30",
"content": "responds to urgent emails",
"category": "work",
"urgent": true,
"doneDate": "2023-03-24T10:39:28.977Z"
}
RESPONSE: HTTP 200
GET /todolist/{id}
Accept: application/json
Content-Type: application/json
{
"id": "0464c4ee-9f34-492a-bc6f-f105ca841c30",
"content": "responds to urgent emails",
"category": "work",
"urgent": true,
"doneDate": "2023-03-24T10:39:28.977Z"
}
RESPONSE: HTTP 200
POST /todolist
Accept: application/json
Content-Type: application/json
{
"id": "0464c4ee-9f34-492a-bc6f-f105ca841c30",
"content": "responds to urgent emails",
"category": "work",
"urgent": true,
"doneDate": "2023-03-24T10:39:28.977Z"
}
RESPONSE: HTTP 201 (Created)