title: how to check input type boolean in request body
body: <p>in request body have an attribute has type boolean, when i pass a string or an integer for it, it throw httpmessagenotreadableexception. I try to handle it in my code</p>
  
  <pre><code> @SuppressWarnings("unchecked")
    @ExceptionHandler(HttpMessageNotReadableException.class)
    public final ResponseEntity&lt;Object&gt; handleAllExceptions(HttpMessageNotReadableException ex, WebRequest request) {
  
      return new ResponseEntity(HttpStatus.BAD_REQUEST);
    }
  </code></pre>
  
  <p>but it show a message:</p>
  
  <p>Error creating bean with name 'handlerExceptionResolver' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class].</p>
  
  <p>Can some one help me how to fix it</p>