io.microsphere.spring.webmvc.advice.ResponseBodyAdviceAdapter Maven / Gradle / Ivy
package io.microsphere.spring.webmvc.advice;
import org.springframework.core.MethodParameter;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
/**
* {@link ResponseBodyAdvice} Adapter Class
*
* @param HTTP Response content entity type
* @author Mercy
* @since 1.0.0
*/
public abstract class ResponseBodyAdviceAdapter implements ResponseBodyAdvice {
@Override
public T beforeBodyWrite(T body, MethodParameter returnType, MediaType selectedContentType,
Class extends HttpMessageConverter>> selectedConverterType, ServerHttpRequest request,
ServerHttpResponse response) {
return body;
}
}