title: Jersey/JAX-RS resource method input bean validation
body: <p>I am using Jersey/JAX-RS via DropWizard 0.7.1 to expose RESTful service endpoints. I have all of my entity POJOs annotated with both JAX-RS and Hibernate/JSR-303 bean validation annotations like so:</p>
  
  <pre><code>public class Widget {
      @JsonProperty("fizz")
      @NotNull
      @NotEmpty
      private String fizz;     // Can't be empty or null
  
      @JsonProperty("buzz")
      @Min(value=5L)
      private Long buzz;       // Can't be less than 5
  
      // etc.
  }
  </code></pre>
  
  <p>When a resource method receives one of these POJOs as input (under the hood, DropWizard has already deserialized the HTTP entity JSON into a <code>Widget</code> instance), I would like to validate it against the Hibernate/Bean Validation annotations:</p>
  
  <pre><code>@POST
  Response saveWidget(@PathParam("widget") Widget widget) {
      // Does DropWizard or Jersey have something built-in to automagically validate the
      // 'widget' instance?
  }
  </code></pre>
  
  <p>Can DropWizard/Jersey be configured to validate my <code>widget</code> instance, without me having to write any validation code here?</p>