类的使用
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的子类 修饰符和类型 类 说明 classWebExchangeBindExceptionA specialization ofServerWebInputExceptionthrown when after data binding and validation failure.org.springframework.web.server中ResponseStatusException的使用
org.springframework.web.server中ResponseStatusException的子类 修饰符和类型 类 说明 classMediaTypeNotSupportedStatusException已过时。in favor ofUnsupportedMediaTypeStatusException, with this class never thrown by Spring code and to be removed in 5.3classMethodNotAllowedExceptionException for errors that fit response status 405 (method not allowed).classNotAcceptableStatusExceptionException for errors that fit response status 406 (not acceptable).classServerErrorExceptionException for anHttpStatus.INTERNAL_SERVER_ERRORthat exposes extra information about a controller method that failed, or a controller method argument that could not be resolved.classServerWebInputExceptionException for errors that fit response status 400 (bad request) for use in Spring Web applications.classUnsupportedMediaTypeStatusExceptionException 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 ModelAndViewResponseStatusExceptionResolver. resolveResponseStatusException(ResponseStatusException ex, HttpServletRequest request, HttpServletResponse response, Object handler)Template method that handles anResponseStatusException.