java poi getInpuStream报错

是这样的,我写了重载了两个getInputStream方法,当调用不带参数的方法时,运行正常,当调用带参的方法则报 Can not find a java.io.InputStream with the name [inputStream] in the invocation stack的错误
代码如下:
Struts2配置:

 <action name="ajaxUserDataExportAction" class="com.action.AjaxUserDataExportAction">
             <result  type="stream">
                 <param name="ContentType">application/vnd.ms-excel</param>
                 <param name="inputName">inputStream</param>                                      
                 <param name="contentDisposition">filename="user.xlsx"</param>
             </result>
        </action>   

spring配置

 <bean id="userManageService" class="com.hy.serviceimp.UserManageService">
    <property name="baceDaoImp" ref="baceDaoImp"></property>
</bean>

调用代码:

调用带参数的getInputStream,程序报错

 public InputStream getInputStream()
    {
        System.out.println(userManageService.getInputStream(curPage, pageSize, sortName, sortOrder, searchValue)==null);
        return userManageService.getInputStream(curPage, pageSize, sortName, sortOrder, searchValue);
    }

调用不带参数的,则运行正常

 public InputStream getInputStream()
    {
        System.out.println(userManageService.getInputStream()==null);
        return userManageService.getInputStream();
    }

1个回答

错误已经找到,是数据插入错误引起的

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问