
Learn to build rest APIs with Spring Boot through a practical, step-by-step approach for beginners and busy developers, following along with examples on Ubuntu, IntelliJ IDEA, and Postman.
Install Postman by visiting the official Postman website, download the right version for your operating system, complete the installation, then open Postman to view the interface.
Explore Postman interface, including collections, history, and environments, and learn to send get, post, patch, and delete requests, save work by logging in, and view responses in the response panel.
Learn how rest apis use uris to identify resources, employ post resource names with http methods and json payloads, and model relationships between users, posts, and comments for clean design.
Explore how client apps communicate with backends through http requests in Spring Boot REST API. Learn the core http methods post, get, put, and delete, and the create/read/update/delete patterns.
Explore how headers specify the content type for a json request body, and how the server converts json to a Java object and returns json when properly configured.
Generate a new Spring Boot project quickly on start.spring.io by selecting Java 17, adding Spring Web and Lombok dependencies, and then generate the project with Spring Boot 4.0.4.
Download, unzip, and organize the generated Spring Boot project, then open it in IntelliJ to review dependencies such as Lombok and starter web MVC, confirming the project is ready.
Run the Spring Boot application in IntelliJ by launching the main class annotated with Spring Boot, and verify the server starts on port 8080 with console logs showing it's running.
Create your first endpoint in the UserController to handle HTTP requests and return JSON responses. Begin by adding a controller package and a UserController class.
Add the RESTController annotation at the top of the UserController class so it can handle incoming HTTP requests.
Define the request mapping annotation below the REST controller to route user-related requests with a base path, so all endpoints start with /users.
Define http methods for get, post, put, and delete to manage user data, return json data, and build a simple rest api that supports basic crowd operations.
Test your Spring Boot REST API by running the app on port 8080 and using Postman to create a fast track collection with getUser and createUser requests.
Learn how to read a user id from the URL path using a path variable in a Spring Boot REST controller method. Test with Postman to retrieve a single user.
Update the user controller to read the user id from the url with the path variable annotation, return the id, and test the endpoint using postman.
Learn how to read query parameters from the url, implement pagination to avoid returning all users at once, using page and limit parameters such as ?page=2&limit=10.
Learn how to read query parameters in a spring boot rest controller, return a collection of users, and test filtering with postman.
Update the getUsers() method to pass request parameters as key-value pairs, test page and limit, and observe that removing a parameter causes an error since they are required by default.
Make parameters optional by setting default values in the user controller, then verify default pagination (page 1, limit 10); highlight the use of query parameters for pagination, filtering, and sorting.
Return a Java object containing user details and prepare responses in JSON or SML formats, as we implement this in the next step.
Create a separate entity package, define a user class with fields, and generate getters and setters to produce a simple Java object for a Spring Boot REST API.
Modify the user controller by returning a user object from getUser(), update the method, rerun the application, and test with Postman to see the JSON response.
Learn how Spring Boot returns JSON by default, request SML via the accept header in Postman, understand the 406 not acceptable error, and enable SML support.
Add the xml dependency in pom.xml using jackson data format, paste it under pub.sms, remove version and scope, restart the application, and test the sms response in postman.
Update the Spring Boot REST API controller to support both JSON and XML by modifying the getUser method and its get mapping.
Learn to return a custom HTTP status code by using response entity, replacing default 200 OK. Update the method to return the user and test with Postman.
Learn to handle POST requests, read the JSON payload from the request body, and convert it into a Java object by creating a class for the /users createUser method.
Create a dto package with a UserRequest class to define data transfer, and update createUser to inject the request body so Spring Boot converts JSON to a Java object.
Make the endpoint flexible by supporting JSON and XML for requests and responses, and implement a method that handles both formats.
Create a user and return a response entity, showing how data from Postman is received and returned as an HTTP response.
Add validation to createUser by importing Spring validation dependency and applying not null for first and last names, @Email for email, and password size constraints in DTO.
Store user records in memory using a Java map to save, retrieve, and update them, and understand why a database is used in real-world applications.
Learn to implement an in-memory user store with a Java map in a Spring Boot REST API, generating a UUID for each new user and ensuring the map is initialized.
Modify the getUser method to return data from a map, checking the map exists and contains the user ID, returning the user when present and no content otherwise.
Test the flow by rerunning the application, creating a new user in Postman to obtain an id, then retrieve the stored user details from in-memory storage that resets on restart.
Learn how to update a user using the HTTP PUT request in Spring Boot, including specifying the user ID, configuring PUT mapping, and sending JSON headers via Postman.
Prepare data to update by reusing existing post request data, copy it, and set the post body to update only the name, the first name, and the last name.
Learn to handle put requests in a spring boot rest api by updating the user endpoint to receive id from the path and body, reusing the post approach with validation.
Create a user update dto named UserUpdateRequest, learn to separate dtos for clarity, define two feeds, add getters and setters, and import the dto into the method.
update the user by id, apply request data to fields, save the updated user in the map, and return the updated user.
Test the update flow in an in-memory store using Postman by creating and updating a user. Highlight the difference between full-resource updates and patch for partial updates.
Handle http delete requests using delete mapping with a user id path variable to delete a user. Use Postman to send delete request; no body or content type required.
Are you a Java developer who wants to learn how to build modern REST APIs using Spring Boot without spending weeks going through unnecessary theory? This course is designed specifically for busy developers and beginners who want a clear, practical, and fast path to building real-world REST APIs.
In this hands-on course, you will learn how to design, build, test, and deploy RESTful APIs using Spring Boot, one of the most popular frameworks in the Java ecosystem. Instead of focusing only on theory, we will build real API endpoints step-by-step so you can quickly understand how modern backend applications are developed.
You will start with the fundamentals of REST APIs and Spring Boot, and then progressively move toward building production-ready APIs using best practices. Along the way, you will learn how to structure your project, implement CRUD operations, connect to a database using Spring Data JPA, handle validation and errors, and test your APIs using tools like Postman.
By the end of this course, you will have the confidence to build your own REST APIs and integrate them into real applications.
This course is perfect for developers who want a practical, focused, and beginner-friendly introduction to REST API development with Spring Boot.
If you want to learn how to build clean, scalable, and maintainable APIs using modern Java tools, this course will guide you step by step.