Class ResponseExcelReturnValueHandler

java.lang.Object
cn.twelvet.excel.aop.ResponseExcelReturnValueHandler
All Implemented Interfaces:
org.springframework.web.method.support.HandlerMethodReturnValueHandler

public class ResponseExcelReturnValueHandler extends Object implements org.springframework.web.method.support.HandlerMethodReturnValueHandler
处理@ResponseExcel 返回值
Author:
twelvet
  • Constructor Details

    • ResponseExcelReturnValueHandler

      public ResponseExcelReturnValueHandler(List<SheetWriteHandler> sheetWriteHandlerList)
      IOC
      Parameters:
      sheetWriteHandlerList - List
  • Method Details

    • supportsReturnType

      public boolean supportsReturnType(org.springframework.core.MethodParameter parameter)
      只处理@ResponseExcel 声明的方法
      Specified by:
      supportsReturnType in interface org.springframework.web.method.support.HandlerMethodReturnValueHandler
      Parameters:
      parameter - 方法签名
      Returns:
      是否处理
    • handleReturnValue

      public void handleReturnValue(Object o, org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer modelAndViewContainer, org.springframework.web.context.request.NativeWebRequest nativeWebRequest)
      处理逻辑
      Specified by:
      handleReturnValue in interface org.springframework.web.method.support.HandlerMethodReturnValueHandler
      Parameters:
      o - 返回参数
      parameter - 方法签名
      modelAndViewContainer - 上下文容器
      nativeWebRequest - 上下文