A Spring Boot CRUD application for managing student records.
Easily add, update, view, and delete students using a simple web interface.
- 🧠 Backend: Spring Boot
- 🎨 Frontend (View): Thymeleaf
- 🗄️ Database: PostgreSQL
- 🔄 ORM: Spring Data JPA (Hibernate)
- 🐳 Containerization: Docker
- ⚙️ Build Tool: Maven
- 🌐 Server Port: 8081
This project uses environment variables for database configuration.
DB_URL=jdbc:postgresql://localhost:5432/sms
DB_USERNAME=postgres
DB_PASSWORD=your_password
| HTTP Method | Endpoint | Description | View / Redirect |
|---|---|---|---|
| GET | /students | Display all students | students.html |
| GET | /students/new | Show form to add a new student | create_student.html |
| POST | /students | Save a new student | Redirect → /students |
| GET | /students/edit/{id} | Edit student by ID | edit_student.html |
| POST | /students/{id} | Update student details | Redirect → /students |
| GET | /students/{id} | Delete student | Redirect → /students |
src/
└── main/
├── java/com/suvam/sms/
│ ├── controller/StudentController.java
│ ├── entity/Student.java
│ ├── repository/StudentRepository.java
│ └── service/StudentService.java
└── resources/
├── templates/
│ ├── students.html
│ ├── create_student.html
│ └── edit_student.html
└── application.properties
Dockerfile
FROM eclipse-temurin:17-jdk-alpine
WORKDIR /app
COPY target/student-management-system.jar app.jar
EXPOSE 8081
ENTRYPOINT ["java", "-jar", "app.jar"]
- ✅ List all students
- ✅ Add new student
- ✅ Update student details
- ✅ Delete student
- ✅ PostgreSQL integration
- ✅ Environment variable based configuration
- ✅ Dockerized application