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呢,求救啊
慕姐8265434
守着一只汪
慕仙森
相关分类