How hlawutelo-mabasas/student-management-system works
This is a Spring Boot student-management web app. A user submits a student operation through the MVC controller; the service validates and transforms the request, then uses the repository to read or persist Student records in MySQL. The controller returns list or edit views, while exception handling provides an error view. The README documents add, list, edit, delete, and generated student numbers. Templates and application configuration are represented from the tree and README; their source contents were not sampled, so their detailed wiring is not asserted.
Main entry points: StudentController.java Student controller · StudentRepository.java Student repository · StudentService.java Student service · DataInitializer.java Sample data initializer
Components 18
Web interface
- Student controller
src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java - Student list view
src/main/resources/templates/students.html - Edit student view
src/main/resources/templates/edit-student.html - Error view
src/main/resources/templates/error.html - Web routing config
src/main/java/com/hlawutelo/studentmanagement/config/WebConfig.java - Delete confirmation
src/main/resources/static/js/script.js - Page styling
src/main/resources/static/css/styles.css - Exception handler
src/main/java/com/hlawutelo/studentmanagement/exception/GlobalExceptionHandler.java
Student domain
- Student service
src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java - Student entity
src/main/java/com/hlawutelo/studentmanagement/model/Student.java - Student DTO
src/main/java/com/hlawutelo/studentmanagement/dto/StudentDTO.java - Not-found exception
src/main/java/com/hlawutelo/studentmanagement/exception/ResourceNotFoundException.java
Persistence
- Student repository
src/main/java/com/hlawutelo/studentmanagement/repository/StudentRepository.java - MySQL database
Application setup
- Database settings
src/main/resources/application.properties - Sample data initializer
src/main/java/com/hlawutelo/studentmanagement/config/DataInitializer.java - Application entry point
src/main/java/com/hlawutelo/studentmanagement/StudentManagementApplication.java
Other components
- User
Connections 14
- User → Student controller: uses CRUD
README.md - Student controller → Student service: delegates operations
src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java - Student controller → Student list view: returns list view
src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java - Student controller → Edit student view: returns edit view
src/main/java/com/hlawutelo/studentmanagement/controller/StudentController.java - Student service → Student repository: reads and writes
src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java - Student repository → Student entity: persists entity
src/main/java/com/hlawutelo/studentmanagement/repository/StudentRepository.java - Student service → Not-found exception: throws when missing
src/main/java/com/hlawutelo/studentmanagement/service/StudentService.java - Exception handler → Error view: returns error view
src/main/java/com/hlawutelo/studentmanagement/exception/GlobalExceptionHandler.java - Student repository → MySQL database: stores records
README.md - Database settings → MySQL database: configures connection
README.md - Sample data initializer → Student repository: seeds a record
src/main/java/com/hlawutelo/studentmanagement/config/DataInitializer.java - Application entry point → Sample data initializer: starts component
- Web routing config → Student controller: redirects to root
src/main/java/com/hlawutelo/studentmanagement/config/WebConfig.java - Delete confirmation → Student list view: confirms deletion