Springboot上传文件报错
Failed to parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [/data/upload_tmp/work/Tomcat/localhost/ROOT] is not valid
首先保证设置的临时目录有权限访问,然后进行如下配置:
解决方法一
配置server.tomcat.basedir
:
server:
tomcat:
basedir: /data/upload_tmp
解决方法二
启动脚本修改
-Djava.io.tmpdir=/opt/tridion/deployer-live/tmp
参考: