Build Spring Boot REST API | GET and POST Methods | Chapter #3 @GenuineCoder
Build Spring Boot REST API | GET and POST Methods | Chapter #3  @GenuineCoder
Uploaded March 2022 | Updated September 2026, 3 weeks ago
In this tutorial, we will learn how to create REST API using spring boot. We will create two endpoints. One GET endpoint for getting all the employee objects from the server and one POST endpoint for accepting new employees that need to be saved.

For marking a class as a REST Controller, spring provides an annotation "@RestController". Then we can write functions in the class that creates new Restful API endpoints.

For creating a GET endpoint, we will use @GetMapping annotation. Within the annotation, we will give the URL we would like to have for the endpoint. Similarly, for creating a POST endpoint, we will use @PostMapping annotation.

Once the endpoints are created, we will test them using the Postman tool.

You can find this project in GitHub at github.com/afsalashyana/Spring-boot-tutorial
Genuine Coder Blog: genuinecoder.com

Tags: #Java #SpringBoot

Introduction: (0:00)
Create new Rest Controller class: (1:33)
Create GET endpoint: (4:04)
Test GET endpoint with Postman: (8:55)
Create POST endpoint: (11:46)
Test POST endpoint with Postman: (14:00)
Improve POST endpoint by returning Employee object: (17:34)
Build Spring Boot REST API | GET and POST Methods | Chapter #3JavaFX Circular Reveal Scene Transition AnimationNetBeans GUI Builder - JFrame and JButtonJavaFX Slide Transition Animation for ScenesJavaFX Library Software #11 : Selecting Book For Issue OperationJavaFX Material Design Library Project #39 : Improving Renew/Submission UIJDBC Tutorial for Beginners #6 : Display database query results in a TableJava Webcam Capture for Beginners #2 : Take Images with Different ResolutionsJavaFX 3D Tutorial #3 - Rotating 3D Objects with Keyboard InputJavaFX 14 (2020 Release) Introduction - Creating a new project with JDK 11 and JDK 14JavaFX Tutorial : Using Area Chart and Scatter ChartJavaFX Animation Tutorial #7: PathTransition with Complex Paths
Genuine Coder |

Build Spring Boot REST API | GET and POST Methods | Chapter #3

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER