debug发现的错误位置,报错信息为空指针异常,debug发现这个为null但是不知道原因这个是请求的参数,我感觉没错啊,求解是什么问题额项目中有配置@Bean(name = DispatcherServlet.MULTIPART_RESOLVER_BEAN_NAME)
public CommonsMultipartResolver commonsMultipartResolver(MultipartConfigElement element) {
CommonsMultipartResolver resolver = new CommonsMultipartResolver();
resolver.setMaxUploadSize(element.getMaxRequestSize());
resolver.setMaxUploadSizePerFile(element.getMaxFileSize());
resolver.setResolveLazily(multipartProperties.isResolveLazily());
return resolver;
}我快愁死了,我把这个bean注释掉就能拿到文件了,我在网上找的要不就是吧HttpServletRequest强转成MultipartHttpServletRequest,可我为啥弄了还是null呢,求救啊
添加回答
举报
0/150
提交
取消