title: @Size annotation doesn't seem to work for my class
body: <p>I have a Spring Boot Controller with an endpoint that accepts the following Configuration class (as json). The class has the param <code>maxIterations</code> and has a <code>@Size</code> annotation set to <code>9000</code>.</p>
  
  <pre><code>...
  import javax.validation.constraints.Max;
  import javax.validation.constraints.Size;
  
  public class Configuration {
      // Max iterations
      @Size(max = 9000)
      private Integer maxIterations;
  
      ...
  }
  </code></pre>
  
  <p>The problem is that when making the <code>POST</code> call to that endpoint with the following <code>json</code> it does not return an error or warning stating the the <code>maxIterations</code> parameter is higher than <code>9000</code>.</p>
  
  <pre><code>{
    "maxIterations": 15000
  }
  </code></pre>
  
  <p>This is my controller:</p>
  
  <pre><code>@PostMapping()
  @ResponseStatus(HttpStatus.CREATED)
  public String doSomething(@RequestBody Configuration configuration) {
      ...
  }
  </code></pre>
  
  <p>What can be the issue?</p>