Spring Boot student API with MySQL, Docker & Kubernetes ready, env configurable
1.0K
A production-ready Spring Boot REST API for managing students, backed by a MySQL database.
This version is designed for real-world scenarios and demonstrates a complete containerized architecture using Docker and Kubernetes with externalized configuration.
http://localhost:8080
GET /api/students
Retrieve all students
GET /api/students/{id}
Retrieve a student by ID
POST /api/students
Create a new student
PUT /api/students/{id}
Update an existing student
DELETE /api/students/{id}
Delete a student
GET /api/students/search?course={course}
Filter students by course
GET /api/students/search?status={status}
Filter students by status
GET /api/students/search?course={course}&status={status}
Filter by both course and status
GET /api/students/count
Get total number of students
GET /api/students/version
Get API version
PATCH /api/students/{id}/status
Update only the student status
GET /actuator/health
Health check endpoint
GET /actuator/info
Application info
SPRING_DATASOURCE_URL=jdbc:mysql://<host>:3306/studentdb
SPRING_DATASOURCE_USERNAME=<username>
SPRING_DATASOURCE_PASSWORD=<password>
POST /api/students
{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"course": "Computer Science",
"age": 22,
"status": "ACTIVE"
}
MIT License
Copyright (c) 2026 Giovanni Pace
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
If this project helped you build something useful or learn something new, consider offering a coffee ☕
The best way to support my work is by subscribing to my YouTube channel: https://youtube.com/@archety
Content type
Image
Digest
sha256:1a9488c7d…
Size
140.3 MB
Last updated
6 months ago
docker pull archety/student-api-mysql