Contacts App demo
This is an Android application that allows users to manage their contacts.
This file contains the source code for a REST API that handles CRUD operations on a Contact
entity. The API uses Spring Boot and Lombok libraries.
The following dependencies are required to run the API:
- Spring Boot 2.4.4
- Lombok 1.18.20
- Jakarta Persistence API 2.2.3
- Java 8 or later
The API has the following entity:
Represents a contact with the following attributes:
id
: unique identifier for the contactfirstName
: first name of the contactlastName
: last name of the contactemail
: email address of the contactphone
: phone number of the contacttype
: type of contact (e.g. personal, business)gender
: gender of the contact (e.g. male, female)
The API has the following endpoints:
Returns a list of all contacts in the repository.
Returns the contact with the given id
. Returns an empty Contact
object if the contact is not found.
Creates a new contact in the repository with the given details.
Updates the contact with the given id
with the provided details.
Deletes the contact with the given id
from the repository.
To use the API, follow these steps:
- Clone the repository to your local machine.
- Run the application using your preferred Java IDE or by running the following command from the project directory:`
./mvnw spring-boot:run
- Make HTTP requests to the endpoints listed above using a tool like Postman.
This file was written by Abderrahmane Ettounani.