code: private ModelAndView buildBizErrors(BindException be, ModelAndView mvc) {
          Map<String, Object> paramErrors = new HashMap<String, Object>();
          Object o = be.getTarget();
          for (Object error : be.getAllErrors()) {
              if (error instanceof FieldError) {
                  FieldError fe = (FieldError) error;
                  String field = fe.getField();
                  Field oField = null;
                  try {
                      oField = o.getClass().getField(field);
                  } catch (NoSuchFieldException e) {
                      // TODO: omit handle exception
                  }
                  if (oField == null) {
                      paramErrors.put(field, GlobalResponseStatusMsg.PARAM_BIND_ERROR.getMessage()
                              .getMessage());
                  } else if (oField.getType().equals(Integer.class)
                          || oField.getType().equals(Long.class)
                          || oField.getType().equals(Short.class)) {
                      paramErrors.put(field, GlobalResponseStatusMsg.PARAM_BIND_ERROR.getMessage()
                              .getMessage());
                  } else if (oField.getType().equals(Float.class)
                          || oField.getType().equals(Double.class)) {
                      paramErrors.put(field, GlobalResponseStatusMsg.PARAM_BIND_ERROR.getMessage()
                              .getMessage());
                  } else {
                      paramErrors.put(field, GlobalResponseStatusMsg.PARAM_BIND_ERROR.getMessage()
                              .getMessage());
                  }
              }
          }
  
          return buildBizError(mvc, paramErrors);
      }
docs: 处理参数绑定错误
  
  @param be  绑定异常
  @param mvc mvc
  
  @return mvc