title: Validation of @RequestParam in Spring REST controller doesn't work
body: <p>I want to validete my GET method's params. I added tis dependency:</p>
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-validation&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  <p>I wrote this controller:</p>
  <pre><code>import org.springframework.validation.annotation.Validated;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.bind.annotation.RestController;
  
  import javax.validation.constraints.Min;
  
  @Validated
  @RestController
  public class TestController {
  
      @GetMapping(value = &quot;/test&quot;)
      public String getTest(@Min(value = 3, message = &quot;min 3&quot;)
                            @RequestParam(&quot;hz&quot;) String hz,
                            @RequestParam(&quot;hz1&quot;) String hz1) {
          return &quot;test&quot;;
      }
  }
  </code></pre>
  <p>I added configuration:</p>
  <pre><code>import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
  
  @Configuration
  public class Config {
      @Bean
      public MethodValidationPostProcessor methodValidationPostProcessor() {
          return new MethodValidationPostProcessor();
      }
  }
  </code></pre>
  <p>the request works fine! Why?</p>
  <pre><code>http://localhost:8088/test?hz=12&amp;hz1=123
  </code></pre>