spring boot上传文件错误The temporary upload location [/tmp/tomcat.5260880110861696164.8090/work/Tomcat/localhost/ROOT] is not valid

时间:2022-01-25 14:02:12

参考了:https://www.jianshu.com/p/cfbbc0bb0b84 再次感谢,但还是有些调整

一、在zuul服务中加入两个配置参数(location: /data/apps/temp # 上传文件的临时目录,basedir: /data/apps/temp)

spring boot上传文件错误The temporary upload location [/tmp/tomcat.5260880110861696164.8090/work/Tomcat/localhost/ROOT] is not valid

二、在微服务中不要再加入上面的两个配置了,不然可能报错,不能正常上传成功

spring boot上传文件错误The temporary upload location [/tmp/tomcat.5260880110861696164.8090/work/Tomcat/localhost/ROOT] is not valid