title: What is the difference between ResponseEntity<T> and @ResponseBody?
body: <p>I have a simple handler in my controller which returns a message</p>
  
  <pre><code>@RequestMapping(value = "/message")
  @ResponseBody
  public Message get() {
      return new Message(penguinCounter.incrementAndGet() + " penguin!");
  }
  </code></pre>
  
  <p>At the same time I can use something like this</p>
  
  <pre><code>@RequestMapping(value = "/message")
  ResponseEntity&lt;Message&gt; get() {
      Message message = new Message(penguinCounter.incrementAndGet() + " penguin!");
      return new ResponseEntity&lt;Message&gt;(message, HttpStatus.OK);
  }
  </code></pre>
  
  <p>What is the difference betweet this two approaches? Let's not take into account HttpStatus :)</p>