Skip to content

sairam468/springboot-rest-api-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔗 Spring Boot REST API Examples

📌 Overview

This repository contains multiple Spring Boot REST API projects developed to demonstrate core RESTful web service concepts.

The projects focus on handling HTTP requests, producing and consuming JSON/XML data, request parameter handling, path variables, and inter-application communication using REST APIs.

All APIs are backend-only and tested using tools such as Postman.


🛠 Tech Stack

  • Java
  • Spring Boot
  • Spring Web (REST)
  • Jackson (JSON processing)
  • XML binding
  • Swagger (API documentation)
  • Maven

📂 Projects Included


1️⃣ Basic REST API

Project: BootRestProj01-FirstRestAPI

  • Simple REST endpoint creation
  • Basic request–response handling

2️⃣ REST APIs with Multiple Endpoints

Project: BootRestProj02-RestAPI-DifferentEndPoints

  • Multiple API endpoints
  • HTTP method handling

3️⃣ Sending JSON Response

Project: BootRestProj03-RestAPI-SendingJSONResponse

  • JSON response generation
  • Object to JSON conversion

4️⃣ Sending XML Response

Project: BootRestProj04-RestAPI-SendingXMLResponse

  • XML response handling
  • XML message formatting

5️⃣ Consuming JSON Data

Project: BootRestProj05-RestAPI-GettingJSONContent

  • JSON request body handling
  • Request payload processing

6️⃣ Consuming XML Data

Project: BootRestProj06-RestAPI-GettingXMLContent

  • XML request handling
  • XML payload consumption

7️⃣ Request Parameters

Project: BootRestProj07-RestAPI-RequestParameters

  • Handling query parameters
  • Dynamic request values

8️⃣ Path Variables

Project: BootRestProj08-RestAPI-PathVariables

  • RESTful path variable mapping
  • Dynamic URL handling

9️⃣ REST Consumer & Provider Applications

Projects:

  • BootRestProj09-App-Consumer
  • BootRestProj09-App-Provider
  • BootRestProj10-App-Consumer
  • BootRestProj10-App-Provider
  • BootRestProj11-App-Consumer-exchange
  • BootRestProj11-App-Provider-exchange
  • BootRestProj12-App-Consumer
  • BootRestProj12-App-Provider

Features:

  • REST API consumption using RestTemplate / exchange()
  • Inter-application communication
  • HTTP response handling

🔟 Mini Projects

  • Mini-Project
  • Mini-Project-App-Consumer
  • Mini-Project-App-Consumer-exchange

Focused on:

  • End-to-end REST communication
  • Consumer–provider interaction

📘 Swagger API Documentation

Project: SwaggerAPI

  • API documentation using Swagger
  • Endpoint visualization
  • Request & response testing support

🏗 Architecture

All projects follow REST-based layered architecture:

Controller → Service → Repository (where applicable)

Principles followed:

  • Stateless communication
  • Resource-based URL design
  • Proper HTTP method usage

🎯 Key Learning Outcomes

  • Built RESTful APIs using Spring Boot
  • Handled JSON and XML payloads
  • Implemented request parameters and path variables
  • Developed consumer–provider REST applications
  • Tested APIs using Postman
  • Documented APIs using Swagger

🚀 Future Enhancements

  • Add Spring Security & JWT authentication
  • Introduce pagination & filtering
  • Standardize error handling
  • Add versioned APIs
  • Integrate with frontend clients

👨‍💻 Author

Ganta Lakshman Naga Durga Sairam
Java Full Stack Developer
Hyderabad, India

About

Spring Boot REST API examples demonstrating request handling, JSON/XML processing, path variables, request parameters, and consumer–provider communication.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages