title: How to return a boolean value with rest?
body: <p>I want to provide a <code>boolean</code> <code>REST</code> service that only provides true/false boolean response.</p>
  
  <p>But the following does not work. Why?</p>
  
  <pre><code>@RestController
  @RequestMapping("/")
  public class RestService {
      @RequestMapping(value = "/",
          method = RequestMethod.GET,
          produces = MediaType.APPLICATION_XML_VALUE)
      @ResponseBody
      public Boolean isValid() {
          return true;
      }
  }
  </code></pre>
  
  <p>Result: <code>HTTP 406: The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.</code></p>