类的使用
org.springframework.web.server.ResponseStatusException
使用ResponseStatusException的程序包 程序包 说明 org.springframework.web.bind.support Support classes for web data binding.org.springframework.web.server Core interfaces and classes for Spring's generic, reactive web support.org.springframework.web.servlet.mvc.annotation Support package for annotation-based Servlet MVC controllers.org.springframework.web.bind.support中ResponseStatusException的使用
org.springframework.web.bind.support中ResponseStatusException的子类 修饰符和类型 类 说明 class
WebExchangeBindException
A specialization ofServerWebInputException
thrown when after data binding and validation failure.org.springframework.web.server中ResponseStatusException的使用
org.springframework.web.server中ResponseStatusException的子类 修饰符和类型 类 说明 class
MediaTypeNotSupportedStatusException
已过时。in favor ofUnsupportedMediaTypeStatusException
, with this class never thrown by Spring code and to be removed in 5.3class
MethodNotAllowedException
Exception for errors that fit response status 405 (method not allowed).class
NotAcceptableStatusException
Exception for errors that fit response status 406 (not acceptable).class
ServerErrorException
Exception for anHttpStatus.INTERNAL_SERVER_ERROR
that exposes extra information about a controller method that failed, or a controller method argument that could not be resolved.class
ServerWebInputException
Exception for errors that fit response status 400 (bad request) for use in Spring Web applications.class
UnsupportedMediaTypeStatusException
Exception for errors that fit response status 415 (unsupported media type).org.springframework.web.servlet.mvc.annotation中ResponseStatusException的使用
参数类型为ResponseStatusException的org.springframework.web.servlet.mvc.annotation中的方法 修饰符和类型 方法 说明 protected ModelAndView
ResponseStatusExceptionResolver. resolveResponseStatusException(ResponseStatusException ex, HttpServletRequest request, HttpServletResponse response, Object handler)
Template method that handles anResponseStatusException
.