This project implements a REST API that has CRUD operations, backed by a MongoDB database deployed within a container.
The project uses the following technologies:
- Java
- Spring Framework (for creating general infrastructure and supporting database interaction.)
- Spring Boot (for application setup, configuration, and deployment)
- Spring MVC (for handling HTTP requests and responses)
- Spring Data (for interacting with databases)
- Lombok (for reducing boilerplate code and enhancing Java classes)
- MongoDB (as the database)
- Maven (for dependency management)
- Swagger (for API documentation)
- Git (for version control)
- Docker (for containerization)
To run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/YaremaMaksym/rest-api-with-mongodb.git
-
Open the project in your preferred IDE.
-
Type
docker-compose up -d
to start containers. -
Run the application
- GET /api/v1/students - get list of all students.
- GET /api/v1/students/{email} - get student by email.
- POST /api/v1/students - register new student.
- PUT /api/v1/students/{email} - update fields of student.
- DELETE /api/v1/students/{email} - delete student.
visit http://localhost:8090/swagger-ui/index.html after running app for more detailed documentation