Spring MVC Tutorials 42 - Web Services 12 ( @RequestMapping using Consumes )

preview_player
Показать описание
in this tutorial, we are going to learn about how to make use of Consumes argument with @RequestMapping annotation so as to restrict a REST API controller method to consume request Body message in only one specific format.

Рекомендации по теме
Комментарии
Автор

in the next tutorial, we will learn how to make use of ResponseEntity Return Type with a REST API controller method with some more important concepts... Happy Learning...

gontuseries
Автор

That's a great help ..I am keenly waiting for every videos u upload here ..Thanks a ton ..

nirbikardas
Автор

very well explained the consume attribute - I tried reading about it, but the written explanations were so complicated ^^

g-l
Автор

Nice video's Ankush sir. You explain in simple terms.it helps lot thank you

md
Автор

My Understandings
@RequestBody
This will check the content-type header weather the message in the format of Json/XML, then it will use the appropriate jars from the classpath to convert the message into Java object
1.By make use of consumes argument in RequestMapping annotation, we can restrict the user to send the body/message in server specified format only.
2.By make use of produces argument in RequestMapping annotation, we can restrict the user to request available only for server specified format.

sureshrayudu