Spring Boot Restful Web Service Best Practice, HttpStatus code Exception handling part - Session 15

Опубликовано: 13 Октябрь 2024
на канале: ITGARDEN
378
8

Click the below link to download the latest Billing System Source code.
https://pinepad.in/downloads/
More information about the Billing System Project. Watch this video
   • Billing System using Spring Boot - Bi...  

This video session explains standards about Webservice coding. We can create Webservice but the way of writing code must neat and readable. We need to follow some standards to make our Webservice perfect. For example, if you want to add a record in the database, actually you are creating a new Resource in the Server. in such a case we need to use @PostMapping as an HTTP Method and Created(201) as HTTP Status code. like that, we have to use the correct HTTP method and HTTP status code.
We should not use action names in our endpoint like createRecord, updateRecord, etc. we need to use our resource name in our endpoint for example: /products - This endpoint for adding new product and delete the new product, and updating all product. The single endpoint for handling three different tasks with different HTTP Method and HTTP Status code. We should use @PostMapping for adding new Records or resources to the Server and the status code should use CREATED(201) We should use @DeleteMapping for removing the resource from the Server and the status code should use Success (200). We should use @PutMapping for updating an existing record in the Server and the status code should use Success (200)

Previous video link:
Spring Boot Restful Web Service and CRUD Operations using H2 In-Memory Practical Demo Session 14
   • Spring Boot Restful Web Service and C...  
Download source code from:
https://github.com/sureshstalin/itgar...
You can go thru SpringBoot16 example for SpringBoot 15

I am developing a Billing System using Spring Boot. Already there are many many topics I have posted related to Billing System Project. Please subscribe to this channel to get all new updates about the Billing System and the first version of the Billing System Java code is absolutely free. It is available to download from here https://pinepad.in/downloads/ In the First version of the Billing System, I have implemented all kinds of Technical topics. Technical topics nothing but, integrating Spring boot logging framework, Spring Boot validation framework, and many more. Please follow the Billing System which I developing, it is very useful who wanted to get real-time project experience in Spring Boot. you can easily crack the interviews. Even I am ready to explain the technical topics if you have any doubts about the Project. You can find my contact. You can find my contact @ www.pinepad.in. Also, I have given my LinkedIn, Instagram, and FB profile in my Channel homepage banner (   / @itgarden9753  )

I have posted all technical related topics on the following site. Please check it out
https://pinepad.in/blog/

If you want to only Billing-System-related Technical Topics, please go to the following link.
https://pinepad.in/category/java/bill...

Please follow me on   / suresh-stalin  . The reason I am asking is, if I post any Technical article or billing System-related Article you will be getting a notification.

Click the below link to download the latest Billing System code.
https://pinepad.in/downloads/

All Billing System-related videos update in the following post
https://pinepad.in/java/billing-syste...

#springboothttpstatuscode #springbootwebservicebestpractice #springbootexceptionhandling