类 ServiceMethodReturnValueHandler

java.lang.Object
com.easycode8.fastapi.core.ServiceMethodReturnValueHandler
所有已实现的接口:
org.springframework.web.method.support.HandlerMethodReturnValueHandler

public class ServiceMethodReturnValueHandler extends Object implements org.springframework.web.method.support.HandlerMethodReturnValueHandler
  • 构造器详细资料

    • ServiceMethodReturnValueHandler

      public ServiceMethodReturnValueHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper, MethodChooseCustomizer methodChooseCustomizer)
  • 方法详细资料

    • supportsReturnType

      public boolean supportsReturnType(org.springframework.core.MethodParameter returnType)
      指定者:
      supportsReturnType 在接口中 org.springframework.web.method.support.HandlerMethodReturnValueHandler
    • handleReturnValue

      public void handleReturnValue(Object returnValue, org.springframework.core.MethodParameter returnType, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest) throws Exception
      将结果封装成json格式
      指定者:
      handleReturnValue 在接口中 org.springframework.web.method.support.HandlerMethodReturnValueHandler
      抛出:
      Exception