This REST API application provides a user management tool.
This REST API application is a user management tool which allows you to see, edit and delete all user entries. You can add new users as well.
Back-end
Database
Dependency management tool
IDE
Containerization
$ docker-compose up
This command creates the three docker containers detailed below:
- _user-rest-api_app_1_: Main container of the Spring Boot application
- _user-rest-api_mysql_1_: DB container
- _user-rest-api-adminer_1_: DB management tool to interact with the MySQL DB
Adminer's credentials are the ones defined in .env file.
### Without Docker
- Clone this repo to your local machine. If you use IntelliJ as IDE, open this project there.
- MySQL (and MySQL Workbench, optionally) must be already installed in your machine. Otherwise, you will have to install them. Please notice that the default parameters (port, username and password) to enable the MySQL connection are defined on application.properties file. So, feel free to edit them in order to match one of your MySQL connections.
CREATE SCHEMA user_db
;
```
Action | HTTP request method | Endpoint | Body example |
---|---|---|---|
Create new user | POST | /api/user | {“fname”: “Steven”, “lname”: “Adams”} |
Read all users | GET | /api/users | |
Read user | GET | /api/user/{id} | |
Update user | PUT | /api/user | {“id”: “1”, “fname”: “Anthony”, “lname”: “Davis”} |
Delete user | DELETE | /api/user/{id} |
I have accomplished the aforementioned goals thanks to the following courses: