This project is a simple API using Spring Boot with a docker MySQL database. The API is a simple CRUD of a user entity. It was created to study Java and the Spring Boot framework.
- Java 17
- Docker
- Maven
- Clone the repository
- Run the command
docker-compose up
to start the database - Run the command
mvn spring-boot:run
to start the API
Default URL: http://localhost:8080/api
Method | Endpoint | Parameters | Description |
---|---|---|---|
GET | /users | - | Get all users |
GET | /user | id | Get a user by id |
POST | /user | - | Create a new user |
PUT | /user | id | Update a user |
DELETE | /user | id | Delete a user |
JSON body format for POST and PUT requests.
{
"name": "string",
"email": "string",
}
The database is a docker MySQL database. All credentials are not secure and are only for study purposes.