This is a simple Spring Boot REST API application to manage student data. It provides endpoints to retrieve, add, and delete student records.
src
├── controller
│ └── AppControllers.java
├── model
│ ├── Student.java
│ └── Course.java
- Java 17 or later
- Maven
- IDE (optional): IntelliJ IDEA / Eclipse
- Postman for testing the API
# Compile and run the project
./mvnw spring-boot:runThe app will be available at:
http://localhost:8080/app
http://localhost:8080/app/msgResponse: Hello Spring Boot!
http://localhost:8080/app/age/25Response: `My Age is 25`
http://localhost:8080/app/student http://localhost:8080/app/studentscurl http://localhost:8080/app/students/2020ict65curl -X POST http://localhost:8080/app/add
"Content-Type: application/json"
{
"regNo": "2020ict65",
"name": "Chandru",
"age": 23,
"course": "IT",
"gpa": 3.66
}Response: New Student added
http://localhost:8080/app/students/2020CS99Response:
- If exists:
The student removed - If not:
404 couldn't find the student
- Students are initialized in-memory using a
HashMap, so data will reset on every application restart. - No database connection is used in this project.
- Endpoint /
findageis present but not implemented yet.
{
"regNo": "2020ict65",
"name": "Chandru",
"age": 23,
"course": "IT",
"gpa": 3.66
}This project is for educational use and does not include any license.