Class ResponseExcelReturnValueHandler

  • All Implemented Interfaces:
    org.springframework.web.method.support.HandlerMethodReturnValueHandler

    public class ResponseExcelReturnValueHandler
    extends java.lang.Object
    implements org.springframework.web.method.support.HandlerMethodReturnValueHandler
    处理@ResponseExcel 返回值
    Author:
    lengleng
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handleReturnValue​(java.lang.Object o, org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest nativeWebRequest)
      处理逻辑
      boolean supportsReturnType​(org.springframework.core.MethodParameter parameter)
      只处理@ResponseExcel 声明的方法
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • sheetWriteHandlerList

        private final java.util.List<SheetWriteHandler> sheetWriteHandlerList
    • Constructor Detail

      • ResponseExcelReturnValueHandler

        public ResponseExcelReturnValueHandler()
    • Method Detail

      • 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​(java.lang.Object o,
                                      org.springframework.core.MethodParameter parameter,
                                      org.springframework.web.method.support.ModelAndViewContainer mavContainer,
                                      org.springframework.web.context.request.NativeWebRequest nativeWebRequest)
        处理逻辑
        Specified by:
        handleReturnValue in interface org.springframework.web.method.support.HandlerMethodReturnValueHandler
        Parameters:
        o - 返回参数
        parameter - 方法签名
        mavContainer - 上下文容器
        nativeWebRequest - 上下文