Class ResponseEntityReturnValueHandler

java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityReturnValueHandler
All Implemented Interfaces:
org.springframework.web.method.support.HandlerMethodReturnValueHandler

public class ResponseEntityReturnValueHandler extends Object implements org.springframework.web.method.support.HandlerMethodReturnValueHandler
Handler for return values of type ResponseEntity that delegates to one of the following:

Use of this wrapper allows for late check in handleReturnValue(java.lang.Object, org.springframework.core.MethodParameter, org.springframework.web.method.support.ModelAndViewContainer, org.springframework.web.context.request.NativeWebRequest) of the type of the actual body value in case the method signature does not provide enough information to decide via supportsReturnType(org.springframework.core.MethodParameter).

Since:
7.0
Author:
Rossen Stoyanchev
  • Constructor Details

  • Method Details

    • supportsReturnType

      public boolean supportsReturnType(org.springframework.core.MethodParameter returnType)
      Specified by:
      supportsReturnType in interface org.springframework.web.method.support.HandlerMethodReturnValueHandler
    • handleReturnValue

      public void handleReturnValue(@Nullable Object returnValue, org.springframework.core.MethodParameter returnType, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest request) throws Exception
      Specified by:
      handleReturnValue in interface org.springframework.web.method.support.HandlerMethodReturnValueHandler
      Throws:
      Exception