This project implements a RESTful API service using Spring Boot for managing the exam enrollment process in a Learning Management System (LMS). It uses MySQL for persistent data storage.
- CRUD operations for Students, Subjects, and Exams.
- Foreign key relationships between entities.
- Validation for student enrollment in a subject before exam registration.
- Global error handling with appropriate HTTP status codes.
- Basic unit tests using MockMvc and Mockito.
- Unit tests for core functionalities are included under the
src/test/java
directory.
-
Clone the repository:
git clone https://github.com/yourusername/learning-navigator.git cd learning-navigator
-
Install the required dependencies:
- For Maven:
mvn install
- For Gradle:
./gradlew build
- For Maven:
-
Configure MySQL connection details: Update the
src/main/resources/application.properties
file with your MySQL connection details:spring.datasource.url=jdbc:mysql://localhost:3306/yourdbname spring.datasource.username=yourusername spring.datasource.password=yourpassword spring.jpa.hibernate.ddl-auto=update
-
Run the application:
- For Maven:
mvn spring-boot:run
- For Gradle:
./gradlew bootRun
- For Maven:
-
Test the API using Postman: You can import the Postman collection by clicking the button below:
Feel free to fork this project and contribute by adding new features or improving existing functionalities.