1. Clone the application
https://github.com/Vishal1297/contacts-manager.git
2. Create Mysql database
create database contacts
Note: MySQL database installation is required.
3. Change mysql username and password as per your installation
-
open
src/main/resources/application.properties
-
change
spring.datasource.username
andspring.datasource.password
as per your mysql installation
4. Build and run the app using gradle
gradle wrapper
gradlew build
java -jar build/libs/ContactsManager-0.0.1-SNAPSHOT.jar
The app will start running at http://localhost:8080.
The app defines following CRUD APIs.
POST /contact/v1/contact
- Used to save or update contact
GET /contact/v1/contacts
- Get all existing contacts
GET /contact/v1/contacts/{postalCode}
- Get all contacts filtered by postal code
GET /contact/v1/contact/{uuid}
- Get contact by uuid
DELETE /contact/v1/contact/{uuid}
- Delete contact by uuid
These additional references should also help you: