类 MethodArgumentNotValidException

java.lang.Object
java.lang.Throwable
java.lang.Exception
cn.taketoday.validation.BindException
cn.taketoday.web.bind.MethodArgumentNotValidException
所有已实现的接口:
HttpStatusCodeProvider, cn.taketoday.validation.BindingResult, cn.taketoday.validation.Errors, ErrorResponse, Serializable

public class MethodArgumentNotValidException extends cn.taketoday.validation.BindException implements ErrorResponse
Exception to be thrown when validation on an argument annotated with @Valid fails. Extends BindException.
从以下版本开始:
4.0 2022/3/2 16:18
作者:
Rossen Stoyanchev, Juergen Hoeller, Harry Yang
另请参阅:
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private final ProblemDetail
     
    private final cn.taketoday.core.MethodParameter
     
    private static final long
     

    从接口继承的字段 cn.taketoday.validation.BindingResult

    MODEL_KEY_PREFIX

    从接口继承的字段 cn.taketoday.validation.Errors

    NESTED_PATH_SEPARATOR
  • 构造器概要

    构造器
    构造器
    说明
    MethodArgumentNotValidException(cn.taketoday.core.MethodParameter parameter, cn.taketoday.validation.BindingResult bindingResult)
  • 方法概要

    修饰符和类型
    方法
    说明
    Return the body for the response, formatted as an RFC 7807 ProblemDetail whose status should match the response status.
     
    final cn.taketoday.core.MethodParameter
    Return the method parameter that failed validation.
    Return the HTTP status code to use for the response.

    从类继承的方法 cn.taketoday.validation.BindException

    addAllErrors, addError, equals, findEditor, getAllErrors, getBindingResult, getErrorCount, getFieldError, getFieldError, getFieldErrorCount, getFieldErrorCount, getFieldErrors, getFieldErrors, getFieldType, getFieldValue, getGlobalError, getGlobalErrorCount, getGlobalErrors, getModel, getNestedPath, getObjectName, getPropertyEditorRegistry, getRawFieldValue, getSuppressedFields, getTarget, hasErrors, hasFieldErrors, hasFieldErrors, hasGlobalErrors, hashCode, popNestedPath, pushNestedPath, recordFieldValue, recordSuppressedField, reject, reject, reject, rejectValue, rejectValue, rejectValue, resolveMessageCodes, resolveMessageCodes, setNestedPath

    从类继承的方法 java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    从接口继承的方法 cn.taketoday.web.ErrorResponse

    getHeaders

    从接口继承的方法 cn.taketoday.validation.Errors

    failOnError, toString
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • parameter

      private final cn.taketoday.core.MethodParameter parameter
    • body

      private final ProblemDetail body
  • 构造器详细资料

    • MethodArgumentNotValidException

      public MethodArgumentNotValidException(cn.taketoday.core.MethodParameter parameter, cn.taketoday.validation.BindingResult bindingResult)
      参数:
      parameter - the parameter that failed validation
      bindingResult - the results of the validation
  • 方法详细资料