类 ServerWebInputException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.web.server.ResponseStatusException
- org.springframework.web.server.ServerWebInputException
- 所有已实现的接口:
Serializable
- 直接已知子类:
WebExchangeBindException
public class ServerWebInputException extends ResponseStatusException
Exception for errors that fit response status 400 (bad request) for use in Spring Web applications. The exception provides additional fields (e.g. an optionalMethodParameter
if related to the error).- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 ServerWebInputException(String reason)
Constructor with an explanation only.ServerWebInputException(String reason, MethodParameter parameter)
Constructor for a 400 error linked to a specificMethodParameter
.ServerWebInputException(String reason, MethodParameter parameter, Throwable cause)
Constructor for a 400 error with a root cause.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 MethodParameter
getMethodParameter()
Return theMethodParameter
associated with this error, if any.从类继承的方法 org.springframework.web.server.ResponseStatusException
getHeaders, getMessage, getReason, getResponseHeaders, getStatus
从类继承的方法 org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
构造器详细资料
ServerWebInputException
public ServerWebInputException(String reason)
Constructor with an explanation only.
ServerWebInputException
public ServerWebInputException(String reason, @Nullable MethodParameter parameter)
Constructor for a 400 error linked to a specificMethodParameter
.
ServerWebInputException
public ServerWebInputException(String reason, @Nullable MethodParameter parameter, @Nullable Throwable cause)
Constructor for a 400 error with a root cause.
方法详细资料
getMethodParameter
@Nullable public MethodParameter getMethodParameter()
Return theMethodParameter
associated with this error, if any.