使用Spring的multipartResolver bean解析从dwr调用发送的输入流会抛出Multipart请求未初始化
这是dwr电话:
NotesService.saveOrUpdateNoteswithFile(fileEl, cb);
这是远程委托方法:
public int saveOrUpdateNoteswithFile(FileTransfer[] stream) throws WebException {
....
}
在web-servlet.xml中配置了multipartResolver,如下所示:
<bean id="multipartResolver" class="com.operative.dashboard.web.upload.FileUploadResolver">
<property name="maxUploadSize" value="20971520" />
</bean>