类的使用
org.springframework.web.bind.ServletRequestBindingException
使用ServletRequestBindingException的程序包 程序包 说明 org.springframework.web.bind Provides web-specific data binding functionality.org.springframework.web.method.annotation Support classes for annotation-based handler method processing.org.springframework.web.servlet.mvc.method.annotation MVC infrastructure for annotation-based handler method processing, building on theorg.springframework.web.method.annotationpackage.org.springframework.web.servlet.mvc.support Support package for MVC controllers.org.springframework.web.bind中ServletRequestBindingException的使用
org.springframework.web.bind中ServletRequestBindingException的子类 修饰符和类型 类 说明 classMissingMatrixVariableExceptionServletRequestBindingExceptionsubclass that indicates that a matrix variable expected in the method parameters of an@RequestMappingmethod is not present among the matrix variables extracted from the URL.classMissingPathVariableExceptionServletRequestBindingExceptionsubclass that indicates that a path variable expected in the method parameters of an@RequestMappingmethod is not present among the URI variables extracted from the URL.classMissingRequestCookieExceptionServletRequestBindingExceptionsubclass that indicates that a request cookie expected in the method parameters of an@RequestMappingmethod is not present.classMissingRequestHeaderExceptionServletRequestBindingExceptionsubclass that indicates that a request header expected in the method parameters of an@RequestMappingmethod is not present.classMissingServletRequestParameterExceptionServletRequestBindingExceptionsubclass that indicates a missing parameter.classUnsatisfiedServletRequestParameterExceptionServletRequestBindingExceptionsubclass that indicates an unsatisfied parameter condition, as typically expressed using an@RequestMappingannotation at the@Controllertype level.抛出ServletRequestBindingException的org.springframework.web.bind中的方法 修饰符和类型 方法 说明 voidServletRequestDataBinder. closeNoCatch()Treats errors as fatal.static BooleanServletRequestUtils. getBooleanParameter(ServletRequest request, String name)Get a Boolean parameter, ornullif not present.static DoubleServletRequestUtils. getDoubleParameter(ServletRequest request, String name)Get a Double parameter, ornullif not present.static FloatServletRequestUtils. getFloatParameter(ServletRequest request, String name)Get a Float parameter, ornullif not present.static IntegerServletRequestUtils. getIntParameter(ServletRequest request, String name)Get an Integer parameter, ornullif not present.static LongServletRequestUtils. getLongParameter(ServletRequest request, String name)Get a Long parameter, ornullif not present.static booleanServletRequestUtils. getRequiredBooleanParameter(ServletRequest request, String name)Get a boolean parameter, throwing an exception if it isn't found or isn't a boolean.static boolean[]ServletRequestUtils. getRequiredBooleanParameters(ServletRequest request, String name)Get an array of boolean parameters, throwing an exception if not found or one isn't a boolean.static doubleServletRequestUtils. getRequiredDoubleParameter(ServletRequest request, String name)Get a double parameter, throwing an exception if it isn't found or isn't a number.static double[]ServletRequestUtils. getRequiredDoubleParameters(ServletRequest request, String name)Get an array of double parameters, throwing an exception if not found or one is not a number.static floatServletRequestUtils. getRequiredFloatParameter(ServletRequest request, String name)Get a float parameter, throwing an exception if it isn't found or isn't a number.static float[]ServletRequestUtils. getRequiredFloatParameters(ServletRequest request, String name)Get an array of float parameters, throwing an exception if not found or one is not a number.static intServletRequestUtils. getRequiredIntParameter(ServletRequest request, String name)Get an int parameter, throwing an exception if it isn't found or isn't a number.static int[]ServletRequestUtils. getRequiredIntParameters(ServletRequest request, String name)Get an array of int parameters, throwing an exception if not found or one is not a number..static longServletRequestUtils. getRequiredLongParameter(ServletRequest request, String name)Get a long parameter, throwing an exception if it isn't found or isn't a number.static long[]ServletRequestUtils. getRequiredLongParameters(ServletRequest request, String name)Get an array of long parameters, throwing an exception if not found or one is not a number.static StringServletRequestUtils. getRequiredStringParameter(ServletRequest request, String name)Get a String parameter, throwing an exception if it isn't found.static String[]ServletRequestUtils. getRequiredStringParameters(ServletRequest request, String name)Get an array of String parameters, throwing an exception if not found.static StringServletRequestUtils. getStringParameter(ServletRequest request, String name)Get a String parameter, ornullif not present.org.springframework.web.method.annotation中ServletRequestBindingException的使用
抛出ServletRequestBindingException的org.springframework.web.method.annotation中的方法 修饰符和类型 方法 说明 protected voidAbstractCookieValueMethodArgumentResolver. handleMissingValue(String name, MethodParameter parameter)protected voidRequestHeaderMethodArgumentResolver. handleMissingValue(String name, MethodParameter parameter)org.springframework.web.servlet.mvc.method.annotation中ServletRequestBindingException的使用
参数类型为ServletRequestBindingException的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 protected ResponseEntity<Object>ResponseEntityExceptionHandler. handleServletRequestBindingException(ServletRequestBindingException ex, HttpHeaders headers, HttpStatus status, WebRequest request)Customize the response for ServletRequestBindingException.抛出ServletRequestBindingException的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 protected voidMatrixVariableMethodArgumentResolver. handleMissingValue(String name, MethodParameter parameter)protected voidPathVariableMethodArgumentResolver. handleMissingValue(String name, MethodParameter parameter)org.springframework.web.servlet.mvc.support中ServletRequestBindingException的使用
参数类型为ServletRequestBindingException的org.springframework.web.servlet.mvc.support中的方法 修饰符和类型 方法 说明 protected ModelAndViewDefaultHandlerExceptionResolver. handleServletRequestBindingException(ServletRequestBindingException ex, HttpServletRequest request, HttpServletResponse response, Object handler)Handle the case when an unrecoverable binding exception occurs - e.g. required header, required cookie.