spring boot :The temporary uplo
2018-04-19 本文已影响0人
zhihaoZzz
解决办法
注入对象
@Bean
MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
factory.setLocation("E://tomcat_file/temp");
return factory.createMultipartConfig();
}
或者在配置文件中添加:
spring.http.multipart.location=E://tomcat_file/temp