How asitha123/java-spring-boot-student-management-system works
Project Type & Purpose
• The project is a web-based student management system built with Java and Maven.
• It uses Spring Boot (as noted in the title) for application configuration and runs on an embedded server.
• The system manages entities such as students, meetings, rooms and leverages MongoDB as its database.
File Structure
• The project follows a Maven standard directory layout with a clear separation between source code (src/main/java) and test code (src/test).
• There’s a layered architecture evident from the package structure:
• The “controller” package contains web controllers (e.g., TemplateController) that handle client requests.
• The “service” package (with its interfaces and implementations) handles business logic.
• The “dao” packages (with generic implementations) interact with the persistence layer.
• The “model” packages define the domain entities (Student, Room, Meeting).
• The “common” package holds shared components such as exception handling, messages, and even server-sent event (SSE) functionality.
• There are configuration files (e.g., AppConfiguration.java) and resource configurations (application.yml, _logback.xml) supporting system setup.
• The WEB-INF/jsp directory under the webapp folder indicates that JSP views form the UI.
Key Components & Their Relationships
a. Presentation Layer:
• Components: JSP pages (list.jsp, save.jsp), TemplateController.
• Role: Handles user interaction and presentation.
b. Controller Layer:
• Role: The controllers receive client requests, call the service layer, and return view responses.
c. Service Layer:
• Components: StudentService, MeetingService, RoomService, and their respective implementations.
• Role: Contains business logic, orchestrates calls between controllers and DAOs.
d. Data Access Layer:
• Components: DAO interfaces and implementations for students, meetings, and rooms.
• Role: Manages CRUD operations and directly interacts with the MongoDB database.
e. Domain Model:
• Components: The model classes (Student, Room, Meeting) that represent the core data objects.
f. Common Components:
• Components: Common utilities such as generic DAO support, exception classes, response models, messages, and SSE event handling.
g. External Services:
• MongoDB: As the primary database.
Important Architectural Patterns & Design Principles
• Layered Architecture: Moves from Controllers to Services to DAOs to Models.
• Separation of Concerns: Each layer has clearly defined responsibilities.
• Reusability and Extendability: The “common” packages (generic DAO, services, exception handling) support code reuse across different modules.
• Event-Driven Updates: Inclusion of server-sent event (SSE) components suggests some asynchronous event handling.