Java | J2EE | Spring Boot | REST | SOAP | MySQL | Docker | AWS EC2 | Python Mar 2024 โ May 2024
A production-grade microservice for managing student records, exposing both REST and SOAP APIs, backed by MySQL, containerised with Docker, deployable on AWS EC2, and automated via Python scripts.
student-management-system/
โ
โโโ student-service/ โ Spring Boot Microservice
โ โโโ src/main/java/com/sms/
โ โ โโโ StudentServiceApplication.java โ Main class + seed data
โ โ โโโ model/Student.java โ JPA Entity
โ โ โโโ repository/StudentRepository.javaโ Spring Data JPA
โ โ โโโ service/StudentService.java โ Business logic
โ โ โโโ controller/
โ โ โ โโโ StudentRestController.java โ REST API (@RestController)
โ โ โโโ soap/
โ โ โโโ StudentSoapEndpoint.java โ SOAP endpoint (@Endpoint)
โ โ โโโ SoapModels.java โ JAXB request/response
โ โ โโโ WebServiceConfig.java โ WSDL + Spring WS config
โ โโโ src/main/resources/
โ โ โโโ application.properties
โ โ โโโ wsdl/students.xsd โ XSD schema for SOAP
โ โโโ pom.xml โ Maven dependencies
โ โโโ Dockerfile โ Multi-stage Docker build
โ
โโโ frontend/
โ โโโ index.html โ Single-page dashboard UI
โ
โโโ python-scripts/
โ โโโ automation.py โ Bulk import, health check, stats
โ โโโ soap_client.py โ Python SOAP client (zeep)
โ โโโ requirements.txt
โ
โโโ SMS-Postman-Collection.json โ Import into Postman
โโโ docker-compose.yml โ Full stack orchestration
โโโ nginx.conf โ Reverse proxy config
โโโ init.sql โ DB init script
โโโ deploy-ec2.sh โ AWS EC2 one-click deploy
โโโ README.md
| Layer | Technology |
|---|---|
| Language | Java 17 (J2EE) |
| Framework | Spring Boot 3.2 |
| REST API | Spring MVC (@RestController) |
| SOAP API | Spring WS (@Endpoint, WSDL/XSD) |
| ORM | Spring Data JPA + Hibernate |
| Database | MySQL 8.0 |
| Connection Pool | HikariCP |
| Validation | Bean Validation (Jakarta) |
| Monitoring | Spring Actuator |
| Containerisation | Docker + Docker Compose |
| Cloud | AWS EC2 (Ubuntu 22.04) |
| Reverse Proxy | Nginx |
| Automation | Python 3 (requests, zeep) |
| Testing | Postman, JUnit 5, MockMvc |
| Build Tool | Maven 3.9 |
# 1. Clone and enter
git clone <repo-url>
cd student-management-system
# 2. Launch everything
docker-compose up -d
# 3. Run Python automation (bulk import + health check)
pip3 install -r python-scripts/requirements.txt
python3 python-scripts/automation.py all# 1. Start MySQL
mysql -u root -p -e "CREATE DATABASE student_db;"
# 2. Configure DB in application.properties
cd student-service
# Edit src/main/resources/application.properties
# 3. Build & Run
mvn clean package -DskipTests
java -jar target/student-service-1.0.0.jarBase URL: http://localhost:8080/api
| Method | Endpoint | Description |
|---|---|---|
GET |
/students |
List all students |
GET |
/students?search=<kw> |
Search by name/email/roll |
GET |
/students?department=<dept> |
Filter by department |
POST |
/students |
Create new student |
GET |
/students/{id} |
Get student by ID |
GET |
/students/roll/{rollNumber} |
Get by roll number |
PUT |
/students/{id} |
Full update |
PATCH |
/students/{id}/status |
Update status only |
DELETE |
/students/{id} |
Delete student |
GET |
/students/stats/summary |
Statistics overview |
GET |
/students/health |
Health check |
POST /api/students
{
"firstName": "Aarav",
"lastName": "Sharma",
"email": "aarav.sharma@sms.edu",
"rollNumber": "CS2024001",
"department": "Computer Science",
"semester": 5,
"phone": "+91-9876543210",
"gpa": 3.8,
"status": "ACTIVE"
}WSDL: http://localhost:8080/soap/students.wsdl
Endpoint: http://localhost:8080/soap
Namespace: http://sms.com/students/soap
| Operation | Description |
|---|---|
GetAllStudentsRequest |
Get all students |
GetStudentByIdRequest |
Get student by ID |
CreateStudentRequest |
Create via SOAP |
DeleteStudentRequest |
Delete via SOAP |
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://sms.com/students/soap">
<soapenv:Body>
<tns:GetStudentByIdRequest>
<tns:id>1</tns:id>
</tns:GetStudentByIdRequest>
</soapenv:Body>
</soapenv:Envelope>cd python-scripts
pip3 install -r requirements.txt
# Check service health
python3 automation.py health
# Bulk import from CSV
python3 automation.py import
# Export all to JSON
python3 automation.py export
# Print stats report
python3 automation.py stats
# SOAP client demo
python3 soap_client.py
# Run all tasks
python3 automation.py all# Build image manually
docker build -t student-service ./student-service
# Run with env vars
docker run -d -p 8080:8080 \
-e DB_HOST=mysql \
-e DB_USER=sms_user \
-e DB_PASS=sms_password \
student-service
# Full stack
docker-compose up -d
docker-compose ps
docker-compose logs -f student-service# SSH into your EC2 instance
ssh -i your-key.pem ubuntu@<EC2-IP>
# Upload project
scp -i your-key.pem -r student-management-system ubuntu@<EC2-IP>:~
# One-click deploy
chmod +x deploy-ec2.sh
./deploy-ec2.sh
EC2 Security Group โ Required Inbound Rules:
| Port | Protocol | Purpose |
|---|---|---|
| 22 | TCP | SSH |
| 80 | TCP | HTTP |
| 3000 | TCP | Frontend |
| 8080 | TCP | Spring Boot API |
- Open Postman
- Click Import โ select
SMS-Postman-Collection.json - Set environment variable
BASE_URL = http://localhost:8080 - Run the collection
| URL | Purpose |
|---|---|
/actuator/health |
Health status |
/actuator/info |
App metadata |
/actuator/metrics |
JVM + HTTP metrics |
CREATE TABLE students (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(100) NOT NULL,
last_name VARCHAR(100) NOT NULL,
email VARCHAR(150) UNIQUE NOT NULL,
roll_number VARCHAR(20) UNIQUE NOT NULL,
department VARCHAR(100) NOT NULL,
semester INT,
date_of_birth DATE,
phone VARCHAR(20),
address TEXT,
gpa DOUBLE,
status ENUM('ACTIVE','INACTIVE','GRADUATED','SUSPENDED') DEFAULT 'ACTIVE',
created_at DATETIME,
updated_at DATETIME
);- Project: Microservices โ Student Management System
- Duration: March 2024 โ May 2024
- Stack: Java, J2EE, Spring Boot, REST, SOAP, MySQL, Docker, AWS EC2, Python