What Is @Responsebody
The @Responsebody Annotation Tells a Controller That the Object Returned Is Automatically Serialized into Json and Passed Back into the Httpresponse Object...
The @ResponseBody annotation tells a controller that the object returned is automatically serialized into JSON and passed back into the HttpResponse object.
What is @RequestBody annotation in Spring?
The @RequestBody annotation is applicable to handler methods of Spring controllers. This annotation indicates that Spring should deserialize a request body into an object. This object is passed as a handler method parameter.
What is the purpose of the ResponseBody annotation?
@ResponseBody is a Spring annotation which binds a method return value to the web response body. It is not interpreted as a view name. It uses HTTP Message converters to convert the return value to HTTP response body, based on the content-type in the request HTTP header.