title: What is difference between @RequestBody and @RequestParam?
body: <p>I have gone through the Spring documentation to know about <code>@RequestBody</code>, and they have given the following explanation:</p>
  
  <blockquote>
    <p>The <code>@RequestBody</code> method parameter annotation indicates that a method parameter should be bound to the value of the HTTP request body. For example:</p>
  </blockquote>
  
  <pre><code>@RequestMapping(value = "/something", method = RequestMethod.PUT)
  public void handle(@RequestBody String body, Writer writer) throws IOException {
    writer.write(body);
  }
  </code></pre>
  
  <blockquote>
    <p>You convert the request body to the method argument by using an <code>HttpMessageConverter</code>. <code>HttpMessageConverter</code> is responsible for converting from the HTTP request message to an object and converting from an object to the HTTP response body. </p>
    
    <p><code>DispatcherServlet</code> supports annotation based processing using the <code>DefaultAnnotationHandlerMapping</code> and <code>AnnotationMethodHandlerAdapter</code>. In Spring 3.0 the <code>AnnotationMethodHandlerAdapter</code> is extended to support the <code>@RequestBody</code> and has the following <code>HttpMessageConverter</code>s registered by default: </p>
    
    <p>...</p>
  </blockquote>
  
  <p>but my confusion is the sentence they have written in the doc that is </p>
  
  <blockquote>
    <p>The @RequestBody method parameter annotation indicates that a method parameter should be bound to the value of the HTTP request body.</p>
  </blockquote>
  
  <p>What do they mean by that? Can anyone provide me an example?</p>
  
  <p>The <code>@RequestParam</code> definition in spring doc is </p>
  
  <blockquote>
    <p>Annotation which indicates that a method parameter should be bound to a web request parameter. Supported for annotated handler methods in <code>Servlet</code> and <code>Portlet</code> environments.</p>
  </blockquote>
  
  <p>I have become confused between them. Please, help me with an example on how they are different from each other.</p>