public class ResponseBodyAdvice extends org.aoju.bus.base.spring.BaseAdvice implements org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
| Constructor and Description |
|---|
ResponseBodyAdvice() |
| Modifier and Type | Method and Description |
|---|---|
Object |
beforeBodyWrite(Object body,
org.springframework.core.MethodParameter parameter,
org.springframework.http.MediaType selectedContentType,
Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> selectedConverterType,
org.springframework.http.server.ServerHttpRequest request,
org.springframework.http.server.ServerHttpResponse response)
Invoked after an
HttpMessageConverter is selected and just before
its write method is invoked. |
boolean |
supports(org.springframework.core.MethodParameter returnType,
Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType) |
addAttributes, businessException, commonException, crontabException, defaultException, httpMediaTypeNotSupportedException, httpRequestMethodNotSupportedException, initBinder, instrumentException, noHandlerFoundException, ValidateExceptionpublic boolean supports(org.springframework.core.MethodParameter returnType,
Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)
supports in interface org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>public Object beforeBodyWrite(Object body, org.springframework.core.MethodParameter parameter, org.springframework.http.MediaType selectedContentType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> selectedConverterType, org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response)
HttpMessageConverter is selected and just before
its write method is invoked.beforeBodyWrite in interface org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>body - the body to be writtenparameter - the parameter infoselectedContentType - the content type selected through content negotiationselectedConverterType - the converter type selected to write to the responserequest - the current requestresponse - the current responseCopyright © 2019. All rights reserved.