类的使用
org.springframework.web.HttpMediaTypeNotAcceptableException
使用HttpMediaTypeNotAcceptableException的程序包 程序包 说明 org.springframework.web.accept This package contains classes used to determine the requested the media types in a request.org.springframework.web.servlet.mvc.method.annotation MVC infrastructure for annotation-based handler method processing, building on theorg.springframework.web.method.annotation
package.org.springframework.web.servlet.mvc.support Support package for MVC controllers.org.springframework.web.accept中HttpMediaTypeNotAcceptableException的使用
抛出HttpMediaTypeNotAcceptableException的org.springframework.web.accept中的方法 修饰符和类型 方法 说明 protected MediaType
AbstractMappingContentNegotiationStrategy. handleNoMatch(NativeWebRequest request, String key)
Override to provide handling when a key is not resolved via.protected MediaType
ServletPathExtensionContentNegotiationStrategy. handleNoMatch(NativeWebRequest webRequest, String extension)
已过时。Resolve file extension viaServletContext.getMimeType(String)
and also delegate to base class for a potentialMediaTypeFactory
lookup.List<MediaType>
AbstractMappingContentNegotiationStrategy. resolveMediaTypeKey(NativeWebRequest webRequest, String key)
An alternative toAbstractMappingContentNegotiationStrategy.resolveMediaTypes(NativeWebRequest)
that accepts an already extracted key.List<MediaType>
AbstractMappingContentNegotiationStrategy. resolveMediaTypes(NativeWebRequest webRequest)
List<MediaType>
ContentNegotiationManager. resolveMediaTypes(NativeWebRequest request)
List<MediaType>
ContentNegotiationStrategy. resolveMediaTypes(NativeWebRequest webRequest)
Resolve the given request to a list of media types.List<MediaType>
HeaderContentNegotiationStrategy. resolveMediaTypes(NativeWebRequest request)
Resolve the given request to a list of media types.org.springframework.web.servlet.mvc.method.annotation中HttpMediaTypeNotAcceptableException的使用
参数类型为HttpMediaTypeNotAcceptableException的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 protected ResponseEntity<Object>
ResponseEntityExceptionHandler. handleHttpMediaTypeNotAcceptable(HttpMediaTypeNotAcceptableException ex, HttpHeaders headers, HttpStatus status, WebRequest request)
Customize the response for HttpMediaTypeNotAcceptableException.抛出HttpMediaTypeNotAcceptableException的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 void
RequestResponseBodyMethodProcessor. handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest)
protected <T> void
AbstractMessageConverterMethodProcessor. writeWithMessageConverters(T value, MethodParameter returnType, ServletServerHttpRequest inputMessage, ServletServerHttpResponse outputMessage)
Writes the given return type to the given output message.protected <T> void
AbstractMessageConverterMethodProcessor. writeWithMessageConverters(T value, MethodParameter returnType, NativeWebRequest webRequest)
Writes the given return value to the given web request.org.springframework.web.servlet.mvc.support中HttpMediaTypeNotAcceptableException的使用
参数类型为HttpMediaTypeNotAcceptableException的org.springframework.web.servlet.mvc.support中的方法 修饰符和类型 方法 说明 protected ModelAndView
DefaultHandlerExceptionResolver. handleHttpMediaTypeNotAcceptable(HttpMediaTypeNotAcceptableException ex, HttpServletRequest request, HttpServletResponse response, Object handler)
Handle the case where no message converters were found that were acceptable for the client (expressed via theAccept
header.