A Spring Boot REST API application for managing student data with support for XML and JSON formats.
The application is deployed at: https://restapiapp.onrender.com
- CRUD operations for student management
- Support for both XML and JSON formats
- In-memory data storage
- Cross-Origin Resource Sharing (CORS) enabled
- Detailed API documentation on homepage
- Java 17
- Spring Boot 3.2.1
- Jakarta XML Binding (JAXB)
- Docker
- Maven
GET /api/students curl https://restapiapp.onrender.com/api/students
GET /api/students/{id} curl https://restapiapp.onrender.com/api/students/1
POST /api/students
curl -X PUT "https://restapiapp.onrender.com/api/students"
-H "Content-Type: application/xml"
-H "Accept: application/xml"
-d '
Arvind Updated
Mumbai
9876543210
BCA
'
curl -X POST https://restapiapp.onrender.com/api/students
-H "Content-Type: application/json"
-d '{
"name": "John Doe",
"location": "New York",
"phone": "1234567890",
"course": ["Computer Science"]
}'
PUT /api/students/{id}
curl -X PUT https://restapiapp.onrender.com/api/students/1
-H "Content-Type: application/xml"
-d '
Updated Name
Updated Location
9876543210
Updated Course
'
PATCH /api/students/{id}
curl -X PATCH https://restapiapp.onrender.com/api/students/1
-H "Content-Type: application/xml"
-d '
New Name
'
DELETE /api/students/{id} curl -X DELETE https://restapiapp.onrender.com/api/students/1
- Java 17 or higher
- Maven 3.6 or higher
- Docker (optional)
- Clone the repository
git clone https://github.com/arvind-git-code/REST_API_APPLICATION.git
cd REST_API_APPLICATION
- Build the project
./mvnw clean package
- Run the application
./mvnw spring-boot:run
The application will be available at http://localhost:8080
- Build the Docker image
docker build -t REST_API_APPLICATION .
- Run the container
docker run -p 8080:8080 REST_API_APPLICATION
The application is deployed on Render.com using Docker containerization. The deployment process is automated through Render's continuous deployment feature.
PORT
: The port on which the application runs (default: 8080)
<student>
<id>string</id>
<name>string</name>
<location>string</location>
<phone>string</phone>
<course>array of strings</course>
</student>
- 200 OK: Successful operation
- 404 Not Found: Student not found
- 500 Internal Server Error: Server-side error
- All endpoints support both XML and JSON formats
- Set appropriate Content-Type header for POST, PUT, and PATCH requests
- For JSON requests, use
Content-Type: application/json
- For XML requests, use
Content-Type: application/xml
- Data is stored in memory and resets when the application restarts
Contributions are welcome! Please follow these steps:
Fork the repository.
-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit them:
git commit -m 'Add some feature'
-
Push to the branch:
git push origin feature/your-feature-name
-
Open a pull request.
- Name: Arvind Kumar
- LinkedIn: LinkedIn Profile URL
- Email: Email.
Arvind Maurya
This project is licensed under the MIT License - see the LICENSE file for details.