title: spring boot validator success but no exception throw
body: <p>I use validator in my spring boot, but can not catch any exception, my code is like that</p>
  
  <p>first I create a bean with annotation</p>
  
  <pre><code>@Data
  @EqualsAndHashCode(callSuper = false)
  public class OrderDetailPO extends BaseEntity&lt;String&gt;{
  
      private static final long serialVersionUID = 1L;
      @NotNull
      @Size(max=32,message="ordercode is null")
      private String orderCode;
  
      @NotBlank
      @Size(max=32,message="productMode is null")
      private String productMode;
  
      @NotBlank
      @Size(max=128,message="hotelType is null")
      private String hotelType;
  
      @NotBlank
      @Size(max=32,message="goodsId is null")
      private String goodsId;
  }
  </code></pre>
  
  <p>then I use @validated in the controller</p>
  
  <pre><code>public Result&lt;?&gt; createOrderDetail( @RequestBody @Validated  OrderDetailPO orderDetail,BindingResult bindingResult) throws ParseException, UnsupportedEncodingException {
  
  //       if (bindingResult.hasErrors()) {  
  //              String errMsg="";
  //              for(FieldError err: bindingResult.getFieldErrors()) {  
  //                  errMsg += err.getField()+" is " + err.getCode();
  //              }  
  //              return Result.buildFail(errMsg);
  //          }  
  </code></pre>
  
  <p>then I use an empty request send to the controller, but nothing happens... 
  In my opinion, I can see the error in bindingResult,  but I can not catch an exception as MethodArgumentNotValidException even if I delete bindingResult , and how can I let the exception appear?</p>
  
  <p>yeah, if I only have param not requestbody, how to throw exception? for example</p>
  
  <pre><code> public Result&lt;?&gt; orderDetailSelByAccountId( @NotBlank @Size(min=10,max=32)@PathVariable(value="accountId") String accountId) {
  }
  </code></pre>