REST API with Spring Boot - Read HTTP Request Body with @RequestBody Annotation

preview_player
Показать описание

In this Spring Boot and Spring MVC video tutorial, you will learn how to read JSON or XML payload from an HTTP Request Body in Spring MVC Rest Controller.

As an example, I will use a method in a RestController class with has a @PostMapping to read the body of HTTP Post Request.

**************************************************************************************
Playlists
**************************************************************************************

**************************************************************************************
My Video Courses:
**************************************************************************************

**************************************************************************************
Follow me on Twitter: @kargopolov
Follow me on Instagram: @appsdeveloperblog
**************************************************************************************
Рекомендации по теме
Комментарии
Автор

This is exactly what I was looking for.
Thank you Sergey!

martingallauner
Автор

Thank you, Sergey! It was exactly what I needed!

nikiforovsansanich
Автор

what is UserRest in ResponseEntity<UserRest> ?

muhammadhammaduddin
Автор

Everything is well explained but you haven't mentioned anything about UserRest

kamalp
Автор

waht do you have inside this UserRest class ?

denisr.
Автор

Can anyone tell me what is the use of Response entity?

saicharan
Автор

Hi, I learned About this, Thanks!!!, but What is teh previous video?

joseluisbernalzambrano
Автор

not sure why but even though I haver @requestbody when I send a post the body is always null. If I look at generated UI from swagger its always sending values through query params in url instead of body. Anyone ever run into this?

dawizze
Автор

what is response entity. pls give info

MunniDivya
Автор

Hi, Can we bind more than one @RequestBody with the rest controller?

dailybytes
Автор

Hope that you're there.

How can I call that API via java code and include some request body in code si that I can get firstname and lastname.

Thanks

chiller
visit shbcf.ru