spring boot 文件上传配置文件

spring:
  thymeleaf.cache : false
  messages.basename : static/message/messages
  http:
     multipart:
        enabled: true
        file-size-threshold: 0
        max-file-size: 250Mb
        max-request-size: 500Mb
        location: /home/upload_tmp #测试有问题

/**
 * 文件上传临时路径
 */
 @Bean
 MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setLocation("/app/pttms/tmp");
    return factory.createMultipartConfig();
}
 

猜你喜欢

转载自blog.csdn.net/qq_15140841/article/details/83021398