This is a simple Spring Boot application for managing student data. The application provides basic CRUD operations on student entities.
- Java
- Spring Boot
- Maven
- MySQL
To run the application and its required MySQL database, follow these steps:
- Clone the repository:
git clone https://github.com/NCherfaoui/spring-boot-student-management.git
- Navigate into the directory:
cd spring-boot-student-management
- Start the MySQL database:
docker-compose up -d
- Once the database is up and running, start the Spring Boot application:
mvn spring-boot:run
- Access the application at
http://localhost:8080
This setup ensures that the MySQL database is running before the Spring Boot application starts.
GET /api/v1/student
: Fetch all studentsPOST /api/v1/student
: Add a new studentPUT /api/v1/student/{studentId}
: Update an existing student by IDDELETE /api/v1/student/{studentId}
: Delete a student by ID
A Dockerfile is included for containerizing the application and a docker-compose file for running the MySQL database.
To run the database independently, use the following command:
docker-compose up