Contact Management is a Java Spring Boot RESTful API project designed for managing users, contacts, and addresses, facilitating comprehensive contact management functionalities within applications.
For a detailed guide on how to use the Contact Management API, including endpoints for managing users, contacts, and addresses, please refer to our API Documentation. This comprehensive documentation is hosted on Postman and provides you with all the necessary information to integrate our API into your application seamlessly. It includes example requests, responses, and a clear explanation of each endpoint's functionality.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Before you begin, ensure you have met the following requirements:
- Java JDK 17 or newer
- Maven
- MySQL
-
Clone the repository
git clone https://github.com/yourusername/contact-management.git cd contact-management
-
Configure MySQL Database
Create a database in MySQL and note the credentials. You will need to update the environment variables accordingly.
- Set Environment Variables
Set the following environment variables based on your MySQL configuration:
DB_USER
: Database usernameDB_PASSWORD
: Database passwordDB_HOST
: Database host (e.g., localhost)DB_PORT
: Database port (default is 3306)DB_NAME
: Database name
You can set these variables in your IDE or export them in your terminal session.
If you're using VS Code, you can set them in the launch.json
file under the .vscode
directory.
- Run the Application
Depending on your IDE, you can run the application by running the main class ContactManagementApplication
, or you can run the following command:
mvn spring-boot:run
Make sure to export the environment variables before running the application. The application will start on port 8080 by default.
Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.