日志信息:
Could not parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [/dev1/testuser/management/uptmpfile] is not valid] with root cause
原因是SystemConfig这个类配置的有点问题
@Component
public class SystemConfig {
/**
* 上传临时文件夹路径配置
* @since 2019年2月20日上午9:58:22
* @author
* @return
*/
@Bean
MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
String relativelyPath = System.getProperty("user.dir");
String path = relativelyPath + "/";
factory.setLocation(path + "/uptmpFile");
return factory.createMultipartConfig();
}
}